1
Bilingual Course
Network Communications
网络通信
(For Master Students in the Department of Electronic
Engineering)
Chapter 1 Introduction
Instructor,Dr,Tianshuang Qiu
School of the Electronic and Information
Engineering
Fall of 2004
2
Chapter 1 Introduction
第 1章是对第二部分到第四部分内容的总体介绍,向读者展示一张,总图,。从本质上看,本书主要研究的主题有四个:传输链路上的数据通信、广域网、局域网、
协议与 TCP/IP协议体系。第 1章对这些内容做了简要说明。
3
§ 1-1
Introduction
Communication Systems
Source(信源),信息的发生地;把各种可能的消息变成电信号
信源编码:对信源进行压缩、加密等操作,称为信源编码
Destination(信宿),信息的接收者,将信号再转变为消息
Transmitter(发送设备),将信源输出的信号变换成适合信道传输的形式,并送往信道,又称为信道编码
例,Modem从 PC机上获得一个数据流,将其转换成模拟信号,发送
Channel(信道),信号传输的通道,是发送与接收设备之间的桥梁
常用的信道有 Twisted pair,Cable,Optical fiber,Space,Air etc,
Noise(噪声),传输过程中必然引入的非信息信号,如热噪声、脉冲噪声、干扰与衰落等
Receiver(接收设备),把接收到的信号恢复成原始信号,即解调、
译码、解密等
4
Typical Communication Systems信源 发送设备 信道 接受设备 信宿噪声噪声
5
Communication Modes
Simplex Transmission
消息只能单方向传输
Half-duplex Transmission
双方均能发消息,但是不能同时收或同时发
Full-duplex Transmission
双方均可同时收发消息
A B
A B
A B
6
The Measurement of Information
信息 /消息 /信号
信息( Information):抽象,可以度量,定量分析
消息( Message):具体,一般不定量分析
信号( Signal):是信息(消息)的载体
信息量:信息多少的度量
事件发生的可能性越小,使人感到惊奇与意外,其信息量 ↑,
即消息中的信息量与事件发生的概率紧密相关
事件出现的概率 ↓?信息量 ↑
事件出现的概率 ↑?信息量 ↓
P=1?信息量 =0; P=0?信息量 =∞
信息量的大小与消息的种类和事件的重要程度无关
7
信息量的定义
信息量
若,则信息量的单位为 bit
若,则信息量的单位为 nat
若,则信息量的单位为 哈特莱
为消息出现的概率
2?a
)(l og)](/1[l og xPxPI aa
e?a
10?a
)(xP
8
信息量的计算
离散信源
所产生的消息是一种有限个状态的随机序列
连续信源
所产生的消息的数目是无限的
9
Communication Tasks (Table 1.1)
Transmission system utilization
Interfacing
Signal generation
Synchronization
Exchange management
Error detection and correction
Flow control
Addressing
Routing
Recovery
Message formatting
Security
Network management
10
Transmission system utilization
Transmission system utilization refers to
the need to make efficient use of transmission
facilities that are typically shared among a
number of communicating devices,Various
techniques (referred to as multiplexing) are
used to allocate the total capacity of a
transmission medium among a number of
users,Congestion control techniques may be
required to assure that the system is not
overwhelmed by excessive demand for
transmission services.
11
Interface; Signal generation
To communicate,a device must interface with
the transmission system,All the forms of
communication discussed in this book depend
on the use of electromagnetic signals
propagated over a transmission medium,
Thus,once an interface is established,signal
generation is required for communication,
The properties of the signal,such as form and
intensity,must be such that they are (1)
capable of being propagated through the
transmission system,and (2) interpretable as
data at the receiver.
12
Synchronization,
Error control & Flow Control
Not only must the signals be generated to conform to
the requirements of the transmission system and
receiver,but there must be some form of
synchronization between transmitter and receiver.
In all communication systems,there is a potential for
error; transmitted signals are distorted to some extent
before reaching their destination,Error detection and
correction are required in circumstances where errors
cannot be tolerated,This is usually the case with data
processing system.
Flow control is required to assume that the source does
not overwhelm the destination by sending data faster
than they can be processed and absorbed.
13
Exchange management
Beyond the basic matter of deciding on the nature and timing
of signals,there are a variety of requirements for
communication between two parties that might be collected
under the term exchange management,If data are to be
exchanged in both directions over a period of time,the two
parties must cooperate,For example,for two parties to engage
in a telephone conversation,one party must dial the number of
the other,causing signals to be generated that result in the
ringing of the called phone,The called party complete a
connection by lifting the receiver,For data processing device,
more will be needed than simple establishing a connection;
certain conventions must be decided upon,These conventions
may include whether both devices may transmit
simultaneously or must take turns,the amount of data to be
sent at one time,the format of the data,and what to do if
certain contingencies (意外事故 ) such as an error arise.
14
Addressing & Routing
Next are the related but distinct concepts of addressing
and routing,When a transmission facility is shared by
more than two devices,a source system must indicate
the identity of the intended destination,The transmission
system must assure the destination system,and only
that system,receives the data,Further,the transmission
system may itself be a network through which various
paths may be taken,A specific router through this
network must be chosen.
15
Recovery & Message formatting
Recovery is a concept distinct from that of error
correction,Recovery techniques are needed in situations
in which an information exchange,such as a database
transaction or file transfer,is interrupted due to a fault
somewhere in the system,The objective is either to be
able to resume activity at the point of interruption or at
least to restore the state of the systems involved to the
condition prior to the beginning of the exchange.
Message formatting has to do with an agreement
between two parties as to the form of the data to be
exchanged or transmitted,such as the binary code for
characters.
16
Security & Network Management
Frequently,it is important to provide some measure of
security in a data communications system,The sender
of data may wish to be assured that only the intended
receiver actually receives the data,And the receiver of
data may wish to be assured that the received data have
not been altered in transit and that the data actually
come from the purported (assumed to be such;
supposed) sender.
Finally,a data communications facility is a complex
system that cannot create or run itself,Network
management capabilities are needed to configure the
system,monitor its status,react to failures and
overloads,and plan intelligently for future growth.
17
Various Protocols
AP1 AP2
网络通信服务软件
AP2
AP1
面向应用的协议网络通信服务软件网络接入协议1
网络接入协议3
网络A
网络B
网间互连协议点到点链路协议端到端协议其它网内协议主机用户1 主机用户2
网络接入协议2
终端 终端系统到系统协议
18
Description for Various Protocols
Application oriented protocol
为完成某种特定应用而制定的协议
System to system protocol
支持特定应用进程之间的数据交换(表示层协议)
End to end protocol
完成端到端的可靠传输,建立、保持及维护这种连接
Other protocols inside a Network
流量控制、寻址、路由控制等
Point to point protocol
实现直接相连的节点之间的数据传输(例如数据链路层协议)
Access protocol
介质接入控制等
Internet protocol
不同网络用户的寻址、网间协议的转换等
19
Three Key Elements (三要素 ) of
Protocols
Syntax (语法 )
互通的信息结构(数据格式、编码、信号电平等)
Semantics (语义 )
互换信号的意义(差错处理,控制信息等)
Timing (时序 )
信息的排序,速率,发、收时间等
20
Layers and Architecture
为什么要分层
整套协议庞大复杂,为了便于描述、设计和实现,采用分层结构
体系结构
是计算机通信网的一种抽象、层次化的功能模型
假想的三层模型
Network Access Layer:关心计算机与网络间的数据交换
向网络提供计算机地址
调用网络的服务
根据网络类型使用不同的软件(电路交换、分组交换。。。)
在接入层之上的各层,不关心网络的类型
Transport Layer:是保证数据可靠传输的机制,按顺序排队
Application layer:支持用户应用程序的逻辑
21
A Simplified Example
应用层运输层网络接入层应用层运输层网络接入层计算机1 计算机2
应用协议通信网络网络接入协议
22
Network Access Layer
The Network Access Layer is concerned with the exchange of
data between a computer and the network to which it is attached,
The sending computer must provide the network with the address
of the destination computer,so that the network may route the
data to the appropriate destination,The sending computer may
wish to invoke(调用) certain services,such as priority,that might
be provided by the network,The specific software used at this
layer depends on the type of network to be used; different
standards have been developed for circuit switching,packet
switching,LANs,and others,Thus it makes sense(有意义) to
separate those functions having to do with network access into a
separate layer,By doing this,the remainder of the
communications software,above the network access layer,need
not concerned about the specific of the network to be used,The
same higher-layer software should function properly regardless of
the particular network to which the computer is attached.
23
Transport Layer
Regardless of the nature of the applications that are
exchanging data,there is usually a requirement that data be
exchanged reliably,That is,we would like to be assured that
all of the data arrive at the destination application and that the
data arrive in the same order in which they were sent,As we
shall see,the mechanisms for providing reliability are
essentially independent of the nature of the applications,Thus,
it makes sense to collect those mechanisms in a common layer
shared by all applications; this is referred to as the transport
layer.
Finally,the application layer contains the logic needed to
support the various user applications,For each different type
of application,such as file transfer,a separate module is
needed that is peculiar(特有的) to that application.
24
Protocol Architectures and Networks
(Figure 1.5,E.6)
Application
Application
Application
Transport
Transport
Transport
Network Access
Network Access
Network Access
Communications
Network
Network Address
Service access point
25
Explanation of Figure 1.5,E.6
Figure 1.5 shows three computers connected to a network,
Each computer contains software at the network access and
transport layers and software at the application layer for one or
more applications,For successful communication,every entity
(实体) in the overall system must have a unique address,
Actually,two levels of addressing are needed,Each computer
on the network must have a unique network address; this
allows the network to deliver data to the proper computer,
Each application on a computer must have an address that is
unique within that computer; this allows the transport layer to
support multiple applications at each computer,These layer
address are known as service access points (SAPs),connoting
(内涵) the fact that each application is individually accessing
the services of the transport layer.
26
Operation of Protocol Architecture
(Figure 1.8,E.6)
应用层 应用层运输层运输层网络接入层 网络接入层
Record Record
运输PD U
DSAP
DHost DHost
分组(p ac ke t) 分组(p ac ke t)
源站A 目的站B
27
Explanation of Figure 1.8,E.6
In Figure 1.8,the file transfer module in computer A is
transferring a file one record at a time to computer B,Each
record is handled over to the transport layer module,We
can picture this action as being in the form of a command
or procedure call,The arguments of this procedure call
include the destination computer address,the destination
service access point,and the record,The transport layer
appends the destination service access point and other
control information to the record to create a transport PDU,
This is then handled down to the network access layer by
another procedure call,In this case,the arguments for the
command are the destination computer address and the
transport PDU,The transport PDU is the data field of the
network PDU,and the network PDU header includes
information concerning the source and destination computer
addresses,
28
Explanation of Figure 1.8 (Cont’d)
Note that the transport header is not,visible” at the
network access layer; the network access layer is not
concerned with the contents of the transport PDU.
The network accepts the network PDU from A and delivers it to
B,The network accesses module in B receives the PDU,strips
off the header,and transfers the enclosed transport PDU to B’s
transport layer module,The transport layer examines the
transport PDU header and,on the basis of the SAP field in the
header,delivers the enclosed record to the appropriate
application,in this case the file transfer module in B.
29
OSI Model
Physical,Concerned with transmission of unstructured(非结构化的) bit
stream; deals with the mechanical,electrical,functional,and
procedural characteristics to access the physical medium,(Please)
Data link,Provides for the reliable transfer of information across the
physical link; sends blocks (frames) with the necessary synchronization,
error control,and flow control,(Do Not)
Network,Provides upper layers with independence from the data
transmission and switching technologies used to connect systems,
responsible for establishing,maintaining,and termination connections.
Transport,Provides reliable,transparent transfer of data between end
points; provides end-to-end error recovery and flow control,(Touch)
Session,Provides the control structure for communication between
applications; establishes,manages,and terminates connections
(session) between cooperating applications,(Steven’s)
Presentation,Provides independence to the application processes from
differences in data representation,(Pat)
Application,Provide access to the OSI environment for users and also
provides distributed information services,(Alligator)
30
TCP/IP Model
Physical
Network access
Internet
Transport (Host to host)
Application
Application
Application
Presentation
Session
Transport
Network
Data link
Network
access
Internet
Transport
OSI TCP/IP
PhysicalPhysical
31
数据通信网络的构成
广域网
一般地说,广域网覆盖很大的地理范围,需要穿越公众设施,并且至少有一部分依靠由公共电信运营公司建立的网络进行传输。
电路交换:在两个站点之间建立一条专用的通信路径,途经多个网络节点。
分组交换:数据是以一连串小块形式发送出去的,
称为分组。每个分组都从源点到终点,途中经过一个个节点,穿越整个网络。
32
帧中继:其发展利用了高数据率和低误码率。几乎不为差错控制提供额外的开销。传统的分组交换达到 64kbps,而帧中继可以达到 2Mbps。
ATM:异步传递方式,由称为信元中继。使用长度固定的帧。
局域网
是一种通信网络,连接各种设备,并向这些设备提供交换信息的手段。范围较小。数据率较高。
无线网络:
城域网:其工作范围在广域网与局域网之间。
33
网络的配置
用户 —ISP( Internet 服务提供商)
拨号连接( Modem)
DSL
电缆 Modem
ISP—网络
高速链路
同步光纤
Internet
许多路由器互相连接
不断传送数据包
34
局域网
以太交换机
通过防火墙与 Internet 连接,经过 ATM网络。
有路由器与广域网连接。
广域网
把局域网与 Internet连接起来
专用广域网
ATM网
需要考虑的问题
链路设计问题(包括信号的编码和差错控制)
不同网络的内部构造问题
35
网络的配置
(Fi
gu
re
1.
3,
E
7

36
End of Chapter 1