One of the major functions of the physical layer is to move data in the form of electromagnetic signals across a transmission medium. Whether you are collecting numerical statistics from another computer, sending animated pictures from a design workstation, or causing a bell to ring at a distant control center, you are working with the transmission of data across network connections.
Generally, the data usable to a person or application are not in a form that can be transmitted over a network. For example, a photograph must first be changed to a form that transmission media can accept. Transmission media work by conducting energy along a physical path. For transmission, data needs to be changed to signals.
A computer network is designed to send information from one point to another. This information needs to be converted to either a digital signal or an analog signal for transmission. In this chapter, we discuss the first choice, conversion to digital signals; in next Chapter, we discuss the second choice, conversion to analog signals.
We discussed the advantages and disadvantages of digital transmission over analog transmission in pervious Chapter 3. In this chapter, we show the schemes and techniques that we use to transmit data digitally. First, we discuss digital-to-digital conversion techniques, methods which convert digital data to digital signals. Second, we discuss analogto-digital conversion techniques, methods which change an analog signal to a digital signal. Finally, we discuss transmission modes.
例 A signal is carrying data in which one data element is encoded as one signal element (r = 1). If the bit rate is 100 kbps, what is the average value of the baud rate if c is between 0 and 1?
现在我们可以说,在真实的传输环境中,是波特速率(而非比特速率)决定了所需带宽的大小。在之前的讨论中,我们已经说明了带宽可以指以赫兹为单位的带宽(bandwidth in Hertz)和以每秒比特数为单位的带宽(bandwidth in bits per seconds),所以严格来说,我们现在还需要定义以波特速率为单位的带宽,但我们不会这么做,事实上,带宽是一个复杂的概念,在今后的讨论中,我们将模糊地使用这个概念。
\(0000\)
\(11110\)
Q (Quiet)
\(00000\)
\(0001\)
\(01001\)
I (Idle)
\(11111\)
\(0010\)
\(10100\)
H (Halt)
\(00100\)
\(0011\)
\(10101\)
J (Start delimiter)
\(11000\)
\(0100\)
\(01010\)
K (Start delimiter)
\(10001\)
\(0101\)
\(01011\)
T (End delimiter)
\(01101\)
\(0110\)
\(01110\)
S (Set)
\(11001\)
\(0111\)
\(01111\)
R (Reset)
\(00111\)
\(1000\)
\(10010\)
\(1001\)
\(10011\)
\(1010\)
\(10110\)
\(1011\)
\(10111\)
\(1100\)
\(11010\)
\(1101\)
\(11011\)
\(1110\)
\(11100\)
\(1111\)
\(11101\)
例 We need to send data at a 1-Mbps rate. What is the minimum required bandwidth, using a combination of 4B/5B and NRZ-I or Manchester coding?
要以\(1\text{MHz}\)的速度传输数据(原始比特位),就需要以\(1.25\text{MHz}\)的速度传输编码后的比特位,如果进一步用NRZ-I对编码后的比特位进行传输,带宽最小为\(N/2=625~\text{kHz}\)。如果用 Manchester 编码方式对原始比特位进行传输,所需带宽为\(1\text{MHz}\)。
We have already discussed the advantages and disadvantages of digital and analog transmission. We saw that while digital transmission is very desirable, a low-pass channel is needed. We also saw that analog transmission is the only choice if we have a bandpass channel. Digital transmission was discussed in pervious Chapter; we discuss analog transmission in this chapter.
Converting digital data to a bandpass analog signal is traditionally called digitalto-analog conversion. Converting a low-pass analog signal to a bandpass analog signal is traditionally called analog-to-analog conversion.
3.1 数字数据与模拟信号 Digital-to-Analog Conversion
我们有一系列的技术将数字数据转换为模拟信号,从而在物理介质上直接传输,该类技术统称为调制解调技术(modulation and demodulation),调制器(modulator)将数字数据转换为模拟信号,解调器(demodulator)将模拟信号转换为数字数据,这两个设备统称为调制解调器(modem)。
In real life, we have links with limited bandwidths. The wise use of these bandwidths has been, and will be, one of the main challenges of electronic communications. However, the meaning of wise may depend on the application. Sometimes we need to combine several low-bandwidth channels to make use of one channel with a larger bandwidth. Sometimes we need to expand the bandwidth of a channel to achieve goals such as privacy and antijamming. In this chapter, we explore these two broad categories of bandwidth utilization: multiplexing and spectrum spreading. In multiplexing, our goal is efficiency; we combine several channels into one. In spectrum spreading, our goals are privacy and antijamming; we expand the bandwidth of a channel to insert redundancy, which is necessary to achieve these goals.
We have discussed many issues related to the physical layer. In this chapter, we discuss transmission media. We definitely need transmission media to conduct signals from the source to the destination. However, the media can be wired or wireless.
very low frequency (VLF)
\(3-30~\text{kHz}\)
Ground
Long-range radio navigation
low frequency (LF)
\(30-300~\text{kHz}\)
Ground
Radio beacons and navigational locators
middle frequency (MF)
\(3~\text{kHz}-3~\text{MHz}\)
Ground or Sky
AM radio
high frequency (HF)
\(3-30~\text{MHz}\)
Sky
Citizens band (CB), ship/aircraft
very high frequency (VHF)
\(30-300~\text{kHz}\)
Sky and line-of-sight
VHF TV, FM radio
ultrahigh frequency (UHF)
\(300~\text{MHz}-3~\text{GHz}\)
Line-of-sight
UHF TV, cellular phones, paging, satellite
superhigh frequency (SF)
\(3-30~\text{GHz}\)
Line-of-sight
Satellite
extremely high frequency (EHF)
\(30-300~\text{GHz}\)
Line-of-sight
Radar, satellite
5.2.1 无线电波 Radio Waves
频率在\(3~\text{kHz}\)和\(1~\text{GHz}\)之间的波段称为无线电波(radio waves),它的发送常常是没有方向的(即为广播的),通过天线(antenna)向各个方向传播(可以很好地穿透建筑物),也可以被任意天线接收到。常见的应用是 AM 收音机。
Switching is a topic that can be discussed at several layers. We have switching at the physical layer, at the data-link layer, at the network layer, and even logically at the application layer (message switching). We have decided to discuss the general idea behind switching in this chapter, the last chapter related to the physical layer. We particularly discuss circuit-switching, which occurs at the physical layer. We introduce the idea of packet-switching, which occurs at the data-link and network layers, but we postpone the details of these topics until the appropriate chapters.
6.1 集线器,交换机和路由器 Hub, Switch and Router
6.1.1 集线器 Hub
交换机(switch)和集线器非常相似,它也是一个具有多个端口、用于网络设备互联的设备,但是交换机可以学习连接到目标的物理地址,交换机将这些称为 MAC 地址的物理地址存储在自己的地址表中。当数据包发送到交换机时,数据包会被直接发送到预期的目的端口,而不是像集线器那样,只是将数据包重新广播到每个端口。
举个例子,如果这台计算机想要和另外一台计算机通信,数据包到达交换机后,交换机在自己的地址表中查看与数据包携带的目的 MAC 地址匹配的端口,然后将数据包传送到该端口,数据包就只会发送到想要与之通信的那台计算机。交换机可以减少网络上不必要的流量。
通过集线器,我们仅仅知道哪些设备被物理地连接在一起,通过交换机我们可以知道哪些特定的设备通过 MAC 地址连接到一起。集线器和交换机用于在本地区域内(例如家庭网络中)交换数据,它们不能在外部网络上(例如互联网上)交换数据。
要将数据在自己网络之外交换到另一个网络(例如互联网),设备需要能够读取 IP address,而集线器和交换机不能读取 IP address,这就需要用到路由器。
6.1.3 路由器 Router
路由器(router)是根据 IP address,将一个数据包从一个网络路由(转发)到另一个网络的设备。当路由器接受到数据包时,路由器会检查数据包的 IP address,并确定该数据包是要发送给自己所在的网络,还是要发送给其他网络。如果路由器确定数据包是发送给自己所在的网络,就接受它;如果数据包不是发送给自己所在的网络,路由器就将这些数据包转发给其他网络。
路由器本质上是一个网络的网关。总的来说,集线器和交换机创建了网络,路由器连接了网络。
6.2 交换的两种方法 Three Methods of Switching
6.2.1 电路交换网络 Circuit-Switched Network
Call setup
Required
Not needed
Dedicated physical path
Yes
No
Each packet follows the same route
Yes
No
Packets arrive in order
Yes
No
Is a switch crash fatal
Yes
No
Bandwidth available
Fixed
Dynamic
When can congestion occur
At setup time
On every packet
Potentially wasted bandwidth
Yes
No
Store-and-forward transmission
No
Yes
Transparency
Yes
No
Charging
Per minute
Per packet
7 参考资料
Behrouz A. Forouzan, Data Communications and Networking 5 Edi, McGraw-Hill, 2012
Andrew S. Tanenbaum, David J. Wetherall, Computer Networks 5 Edi, Prentice Hall, 2011
B. Kolman, R. Busby, S. Ross, Discrete Mathematical Structures 6 Edi (Pearson New International Edition), Pearson, 2014
One of the major functions of the physical layer is to move data in the form of electromagnetic signals across a transmission medium. Whether you are collecting numerical statistics from another computer, sending animated pictures from a design workstation, or causing a bell to ring at a distant control center, you are working with the transmission of data across network connections.
Generally, the data usable to a person or application are not in a form that can be transmitted over a network. For example, a photograph must first be changed to a form that transmission media can accept. Transmission media work by conducting energy along a physical path. For transmission, data needs to be changed to signals.
A computer network is designed to send information from one point to another. This information needs to be converted to either a digital signal or an analog signal for transmission. In this chapter, we discuss the first choice, conversion to digital signals; in next Chapter, we discuss the second choice, conversion to analog signals.
We discussed the advantages and disadvantages of digital transmission over analog transmission in pervious Chapter 3. In this chapter, we show the schemes and techniques that we use to transmit data digitally. First, we discuss digital-to-digital conversion techniques, methods which convert digital data to digital signals. Second, we discuss analogto-digital conversion techniques, methods which change an analog signal to a digital signal. Finally, we discuss transmission modes.
例 A signal is carrying data in which one data element is encoded as one signal element (r = 1). If the bit rate is 100 kbps, what is the average value of the baud rate if c is between 0 and 1?
现在我们可以说,在真实的传输环境中,是波特速率(而非比特速率)决定了所需带宽的大小。在之前的讨论中,我们已经说明了带宽可以指以赫兹为单位的带宽(bandwidth in Hertz)和以每秒比特数为单位的带宽(bandwidth in bits per seconds),所以严格来说,我们现在还需要定义以波特速率为单位的带宽,但我们不会这么做,事实上,带宽是一个复杂的概念,在今后的讨论中,我们将模糊地使用这个概念。
\(0000\)
\(11110\)
Q (Quiet)
\(00000\)
\(0001\)
\(01001\)
I (Idle)
\(11111\)
\(0010\)
\(10100\)
H (Halt)
\(00100\)
\(0011\)
\(10101\)
J (Start delimiter)
\(11000\)
\(0100\)
\(01010\)
K (Start delimiter)
\(10001\)
\(0101\)
\(01011\)
T (End delimiter)
\(01101\)
\(0110\)
\(01110\)
S (Set)
\(11001\)
\(0111\)
\(01111\)
R (Reset)
\(00111\)
\(1000\)
\(10010\)
\(1001\)
\(10011\)
\(1010\)
\(10110\)
\(1011\)
\(10111\)
\(1100\)
\(11010\)
\(1101\)
\(11011\)
\(1110\)
\(11100\)
\(1111\)
\(11101\)
例 We need to send data at a 1-Mbps rate. What is the minimum required bandwidth, using a combination of 4B/5B and NRZ-I or Manchester coding?
要以\(1\text{MHz}\)的速度传输数据(原始比特位),就需要以\(1.25\text{MHz}\)的速度传输编码后的比特位,如果进一步用NRZ-I对编码后的比特位进行传输,带宽最小为\(N/2=625~\text{kHz}\)。如果用 Manchester 编码方式对原始比特位进行传输,所需带宽为\(1\text{MHz}\)。
We have already discussed the advantages and disadvantages of digital and analog transmission. We saw that while digital transmission is very desirable, a low-pass channel is needed. We also saw that analog transmission is the only choice if we have a bandpass channel. Digital transmission was discussed in pervious Chapter; we discuss analog transmission in this chapter.
Converting digital data to a bandpass analog signal is traditionally called digitalto-analog conversion. Converting a low-pass analog signal to a bandpass analog signal is traditionally called analog-to-analog conversion.
3.1 数字数据与模拟信号 Digital-to-Analog Conversion
我们有一系列的技术将数字数据转换为模拟信号,从而在物理介质上直接传输,该类技术统称为调制解调技术(modulation and demodulation),调制器(modulator)将数字数据转换为模拟信号,解调器(demodulator)将模拟信号转换为数字数据,这两个设备统称为调制解调器(modem)。
In real life, we have links with limited bandwidths. The wise use of these bandwidths has been, and will be, one of the main challenges of electronic communications. However, the meaning of wise may depend on the application. Sometimes we need to combine several low-bandwidth channels to make use of one channel with a larger bandwidth. Sometimes we need to expand the bandwidth of a channel to achieve goals such as privacy and antijamming. In this chapter, we explore these two broad categories of bandwidth utilization: multiplexing and spectrum spreading. In multiplexing, our goal is efficiency; we combine several channels into one. In spectrum spreading, our goals are privacy and antijamming; we expand the bandwidth of a channel to insert redundancy, which is necessary to achieve these goals.
We have discussed many issues related to the physical layer. In this chapter, we discuss transmission media. We definitely need transmission media to conduct signals from the source to the destination. However, the media can be wired or wireless.
very low frequency (VLF)
\(3-30~\text{kHz}\)
Ground
Long-range radio navigation
low frequency (LF)
\(30-300~\text{kHz}\)
Ground
Radio beacons and navigational locators
middle frequency (MF)
\(3~\text{kHz}-3~\text{MHz}\)
Ground or Sky
AM radio
high frequency (HF)
\(3-30~\text{MHz}\)
Sky
Citizens band (CB), ship/aircraft
very high frequency (VHF)
\(30-300~\text{kHz}\)
Sky and line-of-sight
VHF TV, FM radio
ultrahigh frequency (UHF)
\(300~\text{MHz}-3~\text{GHz}\)
Line-of-sight
UHF TV, cellular phones, paging, satellite
superhigh frequency (SF)
\(3-30~\text{GHz}\)
Line-of-sight
Satellite
extremely high frequency (EHF)
\(30-300~\text{GHz}\)
Line-of-sight
Radar, satellite
5.2.1 无线电波 Radio Waves
频率在\(3~\text{kHz}\)和\(1~\text{GHz}\)之间的波段称为无线电波(radio waves),它的发送常常是没有方向的(即为广播的),通过天线(antenna)向各个方向传播(可以很好地穿透建筑物),也可以被任意天线接收到。常见的应用是 AM 收音机。
Switching is a topic that can be discussed at several layers. We have switching at the physical layer, at the data-link layer, at the network layer, and even logically at the application layer (message switching). We have decided to discuss the general idea behind switching in this chapter, the last chapter related to the physical layer. We particularly discuss circuit-switching, which occurs at the physical layer. We introduce the idea of packet-switching, which occurs at the data-link and network layers, but we postpone the details of these topics until the appropriate chapters.
6.1 集线器,交换机和路由器 Hub, Switch and Router
6.1.1 集线器 Hub
交换机(switch)和集线器非常相似,它也是一个具有多个端口、用于网络设备互联的设备,但是交换机可以学习连接到目标的物理地址,交换机将这些称为 MAC 地址的物理地址存储在自己的地址表中。当数据包发送到交换机时,数据包会被直接发送到预期的目的端口,而不是像集线器那样,只是将数据包重新广播到每个端口。
举个例子,如果这台计算机想要和另外一台计算机通信,数据包到达交换机后,交换机在自己的地址表中查看与数据包携带的目的 MAC 地址匹配的端口,然后将数据包传送到该端口,数据包就只会发送到想要与之通信的那台计算机。交换机可以减少网络上不必要的流量。
通过集线器,我们仅仅知道哪些设备被物理地连接在一起,通过交换机我们可以知道哪些特定的设备通过 MAC 地址连接到一起。集线器和交换机用于在本地区域内(例如家庭网络中)交换数据,它们不能在外部网络上(例如互联网上)交换数据。
要将数据在自己网络之外交换到另一个网络(例如互联网),设备需要能够读取 IP address,而集线器和交换机不能读取 IP address,这就需要用到路由器。
6.1.3 路由器 Router
路由器(router)是根据 IP address,将一个数据包从一个网络路由(转发)到另一个网络的设备。当路由器接受到数据包时,路由器会检查数据包的 IP address,并确定该数据包是要发送给自己所在的网络,还是要发送给其他网络。如果路由器确定数据包是发送给自己所在的网络,就接受它;如果数据包不是发送给自己所在的网络,路由器就将这些数据包转发给其他网络。
路由器本质上是一个网络的网关。总的来说,集线器和交换机创建了网络,路由器连接了网络。
6.2 交换的两种方法 Three Methods of Switching
6.2.1 电路交换网络 Circuit-Switched Network
Call setup
Required
Not needed
Dedicated physical path
Yes
No
Each packet follows the same route
Yes
No
Packets arrive in order
Yes
No
Is a switch crash fatal
Yes
No
Bandwidth available
Fixed
Dynamic
When can congestion occur
At setup time
On every packet
Potentially wasted bandwidth
Yes
No
Store-and-forward transmission
No
Yes
Transparency
Yes
No
Charging
Per minute
Per packet
7 参考资料
Behrouz A. Forouzan, Data Communications and Networking 5 Edi, McGraw-Hill, 2012
Andrew S. Tanenbaum, David J. Wetherall, Computer Networks 5 Edi, Prentice Hall, 2011
B. Kolman, R. Busby, S. Ross, Discrete Mathematical Structures 6 Edi (Pearson New International Edition), Pearson, 2014