Computer Network Chapter 2 (Physical Layer)

Reference tutorial:2.1 Basic concepts of the physical layer_bilibili_bilibili

1. Basic concepts of physical layer

1. Physical layer in computer network architecture

(1)The physical layer considers how to transmit data bit streams on transmission media connecting various computers, that is, Solve the problem of transmitting bits 0 and 1 on various transmission media,and then provide the data link layer with a transparent transmission bit stream service (the so-called "transparent ” refers to the fact that the data link layer cannot see or need to see what method the physical layer uses to transmit bits 0 and 1).

(2)The physical layer shields the data link layer from the differences in various transmission media, so that the data link layer only needs to consider how to complete the protocols and services of this layer. There is no need to consider the specific transmission media of the network.

(3) Since there are many types of transmission media and many physical connection methods, there are many types of physical layer protocols. Each physical layer protocol contains the specific content of the following four tasks.

2. Main tasks of the physical layer

(1) Mechanical characteristics: Directional connection fitting ShapeJapaneseScale sizedevice. lockedsumfixed, order ordersumnumber of legs,

(2) Electrical characteristics: Indicate the range of voltage that appears electrically on each line of the interface cable.

(3) Functional characteristics: Indicate the meaning of a voltage with a certain electrical characteristic appearing on a certain line.

(4) Process characteristics: Indicate the various possible occurrence sequences of events for different functions.

2. Transmission media below the physical layer

Transmission media does not belong to any layer of the computer network architecture. It can be divided into two categories: guided transmission media and unguided transmission media.

1. Guided transmission media

Electromagnetic waves are guided to propagate along solid media (guided transmission media). Common guided transmission media include twisted pairs, coaxial cables, optical fibers, and power lines .

(1) Coaxial cable:

① Baseband coaxial cable (50Ω): used for digital transmission and widely used in early local area networks.

②Broadband coaxial cable (75Ω): used for analog transmission, currently mainly used for cable TV home lines.

③Coaxial cables are more expensive and the wiring is not flexible and convenient. With the emergence of hubs, twisted pairs are basically used as transmission media in the field of local area networks.

(2) Twisted pair:

①Twisted pair is the oldest and most commonly used transmission medium. Two mutually insulated copper wires are placed side by side and then twisted according to certain rules to form a twisted pair.

② In unshielded twisted pair UTP cables, wires of different colors are twisted with white wires respectively. The role of twisting is to resist some electromagnetic wave interference from the outside and reduce Electromagnetic interference from adjacent conductors.

③The shielded twisted pair STP cable has a metal wire braided shielding layer compared to the unshielded twisted pair cable, which improves the ability to resist electromagnetic interference.

(3) Optical fiber:

① Since the optical fiber is very thin, it must be made into a very strong optical cable.

②An optical cable can have at least one optical fiber, and can include dozens to hundreds of optical fibers at most. Adding reinforcing cores and fillers can greatly improve the mechanical strength. If necessary, remote power supply cords can also be put in. Finally Adding the tape layer and outer sheath can bring the tensile strength to several dry grams.

③Parameters of optical cable:

[1] Core diameter: The core diameter of multimode fiber is 50 microns or 62.5 microns, and the core diameter of single-mode fiber is 9 microns.

[2] Cladding diameter: 125 microns.

[3] Working wavelength: 0.85 micron (larger attenuation), 1.30 micron (smaller attenuation), 1.55 micron (smaller attenuation).

④Advantages of optical fiber:

[1] Bandwidth with large communication capacity (25000~30000GHz).

[2] The transmission loss is small and it is more economical for long-distance transmission.

[3] It has good anti-lightning and electromagnetic interference performance, which is particularly important in environments with high current pulse interference.

[4] No crosstalk interference, good confidentiality, and not easy to be eavesdropped.

[5] Small size and light weight.

⑤Disadvantages of optical fiber:

[1] Cutover requires special equipment.

[2] Optical and electrical interfaces are more expensive.

⑥Basic principles of light transmission in optical fibers:

[1] At the transmitting end, a light-emitting diode or a semiconductor laser can be used as the light source, and at the receiving end, a photodiode or laser detector can be used to detect the light pulse.

[2]When light passes fromhigh refractive indexmediato low refractive index a>). Continuously complete Reflection, therefore, if the incident angle is large enough, total reflection will occur , that is, when the light hits the cladding, it will be reflected into the fiber core. This process is repeated, and the light is transmitted along the fiber (the way light is transmitted in the fiber core is: refraction angle will be greater than the incident angle media, its

[3] In fact, as long as the incident angle of the light rays from the core to the core surface is greater than a certain critical angle, total reflection can occur. Therefore, there can be many light rays incident at different angles in one optical fiber. For medium transmission, this optical fiber is multimode optical fiber. Due to the dispersion problem of light, light will inevitably produce signal distortion (that is, pulse broadening) after being transmitted over a certain distance in multimode fiber. Therefore, multimode fiber only Suitable forshort-distance transmission, but multimode fiber does not have high requirements for light sources. Cheaper light-emitting diodes can be used. Correspondingly, photodiodes can be used for detection. light pulse.

[4] If the diameter of the optical fiber is reduced to only one wavelength of light, the optical fiber is like a waveguide, which allowsthe light to propagate forward and has small attenuation, but its manufacturing cost is high and it has high requirements on light sources. It requires the use of expensive semiconductor lasers as light sources. Correspondingly Ground, a laser detector is required to detect light pulses. long-distance transmission. Single-mode fiber is suitable forThere will be no pulse broadening problem. At a wavelength of 1.31 microns, the material dispersion and the waveguide dispersion are equal in magnitude and opposite in sign. The two exactly cancel each other, also has no modal dispersion. Single-mode optical fibersingle-mode fiber, without producing multiple reflections, such an optical fiber is called

(4) Power line:

The earliest example of using power lines to transmit signals was power line telephones. At present, if you want to build a high-performance home LAN, using power lines as the transmission media cannot meet the requirements. For homes that do not have network cabling during decoration, this method can be used; for some companies that use independent rooms for office work, each This method can also be used if there are not many computers in each office and you do not want to wire across offices.

2. Non-guided transmission media

Non-guided transmission media refers to free space. Electromagnetic waves can transmit data information by propagating in free space. The electromagnetic waves that can be used include radio waves, microwaves, and infrared rays. , visible light.

(1) From extremely low frequency to very low frequency, that is, from extremely long wave to very long wave, these frequency bands are not used in the telecommunications field.

(2) Electromagnetic waves in frequency bands from low frequency to very high frequency, that is, from long waves to meter waves, are also called radio waves and are used for international broadcasting, maritime and aviation communications, radio broadcasts, television broadcasts, etc. The low-frequency and medium-frequency bands in radio waves mainly use ground waves for transmission, while the high-frequency and very high-frequency bands mainly rely on reflection from the ionosphere for transmission.

(3) From UHF to extremely high frequency, that is, from decimeter waves to millimeter waves, the electromagnetic waves in these frequency bands are also called microwaves and are used for wireless phones, wireless networks, radar, satellite reception, radio astronomy, and human body scanning. wait.

①Microwave communication occupies an important position in data communication, with a frequency range of 300MHz~300GHz (wavelength 1m~1mm), but the frequency range of 2~40GHz is mainly used.

②Microwaves mainly propagate in straight lines in space. Since microwaves penetrate the ionosphere and enter the universe, they cannot propagate far away on the ground through reflection from the ionosphere.

③There are two main methods of traditional microwave communication:

[1]Ground microwave relay communication: Since microwaves propagate in straight lines in space, and the earth’s surface is a curved surface, its propagation distance is limited, generally only about 50 kilometers, but if a 100-meter-high antenna tower is used, the propagation distance can be increased to 100 kilometers; in order to achieve long-distance communication, several microwave communication channels must be established between the two terminals. A relay station amplifies the signal sent from the previous station and then sends it to the next station.

[2]Satellite Communication: A common method of satellite communication is to use a satellite located at an altitude of about 36,000 kilometers between earth stations. Artificial synchronous earth satellites serve as repeaters to realize microwave relay communications. Their biggest feature is the long communication distance. Correspondingly, the propagation delay is relatively large, generally between 250 and 300ms. In addition to synchronous satellites, low-orbit satellite communication systems It has begun to be deployed in space and forms a high-speed space link.

(4) Infrared rays can also transmit data information. Infrared communication is a point-to-point wireless transmission. There can be no obstacles in the middle. The transmission distance is short and the transmission rate is low.

3. Transmission method

1. Serial transmission and parallel transmission

(1)Serial transmission means that data is sent bit by bit one by one, so between the sending end and the receiving end Only one data transmission line is needed.

(2)Parallel transmission refers to sending multiple bits at a time, so multiple data transmissions are required between the sending end and the receiving end. line. The advantage of parallel transmission is that the speed is several times that of serial transmission. The disadvantage is that the cost is high and the data is susceptible to interference during the transmission process.

(3) Data transmission in computer networks adopts serial transmission, while data transmission within computers often adopts parallel transmission. (Serial transmission is often used for long-distance transmission, and parallel transmission is often used for short-distance transmission)

2. Synchronous transmission and asynchronous transmission

(1) Using the synchronous transmission method, data blocks are transmitted in the form of a stable bit stream, with no gaps between bytes. The end detects at the middle moment of each bit signal to determine whether bit 0 or bit 1 is received. . Since there are certain differences in the clock frequencies of different devices, it is impossible to achieve the same accuracy. The cumulative error of the judgment time is generated in the process of transmitting a large amount of data. It will cause the receiving end to misjudge the bit signal, so it is necessary to adopt methods to synchronize the clocks of both the sending and receiving parties. There are two main methods to achieve clock synchronization of the sending and receiving parties:

① External synchronization: Add a separate clock signal line between the sending and receiving parties. The sending end sends a clock synchronization signal while sending the data signal, and the receiving end receives data according to the rhythm of the clock synchronization signal.

②Internal synchronization: The sending end encodes the clock synchronization signal into the sending data and transmits it together (such as Manchester encoding).

(2) When using the asynchronous transmission method, bytes are used as independent transmission units, and the time interval between bytes is not fixed. (that is, asynchronous between bytes), the receiving end only synchronizes the bits in the byte at the beginning of each byte (the duration of each bit is the same), for this reason usuallyAdd start bit and end bit before and after each byte.

3. Simplex, half-duplex and full-duplex communication

(1) Simplex communication is also called one-way communication. The communicating parties have only one data transmission direction and only require one channel.

(2) Half-duplex communication is also called two-way alternating communication. The two communicating parties can transmit data to each other, but not at the same time. Two channels are required (one in each direction).

(3) Full-duplex communication is also called two-way simultaneous communication. Both communicating parties can send and receive information at the same time, requiring two channels (one in each direction).

4. Coding and Modulation

1. The process of turning a message into a signal

(1) In a computer network, computers need to process and transmit users' text, pictures, audio and video, which can be collectively referred to as messages, and data is the entity that delivers the message .

(2)The computer can only process binary data, that is, bit 0 and bit 1. The network card in the computer converts bit 0 and bit 1 1 is converted into a corresponding electrical signal and sent to the network cable, that is to saythe signal is the electromagnetic representation of the data.

(3) The original electrical signal sent by the source is called baseband signal, and baseband signal is divided into two categories:

①Digital baseband signals, such as signals transmitted between the CPU and memory inside a computer.

② Analog baseband signal, such as the audio signal generated by the microphone after receiving the sound.

(4) Signals need to be transmitted in channels, which can be divided into digital channels and analog channels.

①On the premise of not changing the nature of the signal, only the waveform of the digital baseband signal is transformed. This process is calledencoding,< /span> and can be transmitted in a digital channel. The signal generated after encoding is a digital signal

②Move the frequency range of the digital baseband signal to a higher frequency band and convert it into an analog signal. This process is calledmodulation,< /span> and can be transmitted in an analog channel. The signal generated after modulation is an analog signal

③For the processing of analog baseband signals, there are also two methods: coding and modulation.

2. Transmission media and channels

(1) For simplex transmission, the transmission medium contains only one channel, which can be a sending channel or a receiving channel; for half-duplex transmission and full-duplex transmission, the transmission medium contains two channels, one is the sending channel and the other One is the receive channel.

(2) If channel multiplexing technology is used, a transmission medium can contain multiple channels.

3. Code element

When using waveforms in the time domain to represent digital signals,the basic waveforms that represent different discrete values are called symbols. Simply put, A symbol is a waveform that constitutes a signal. (The figure below is a simple example, which does not mean that a code element can only contain one bit)

4. Commonly used codes

(1) Usenon-return-to-zero coding to generate a bit stream signal:

①The so-called non-return to zero means that the level will not appear at zero level during the entire symbol time. In the example shown in the figure below, the positive level represents bit 1 and the negative level represents bit 0.

②This encoding method requiresan extra transmission line to transmit the clock signal to synchronize the sender and receiver, so that when encountering continuous Only when they contain the same code elements can the receiver accurately determine the number of code elements and receive them. However, for computer networks, would rather use this transmission line to transmit data signals It is not used to transmit clock signals, so since this type of encoding needs to solve synchronization problems, this type of encoding is not used for data transmission in computer networks.

(2) Usereturn-to-zero coding to generate a bit stream signal:

After the transmission of each symbol, the signal must be "returned to zero" (that is, zero level), so the receiver only needs to Sampling can be done after the signal is reset to zero, and a separate clock signal is not required.

②In fact, return-to-zero encoding is equivalent to encoding the clock signal into the data using a "return-to-zero" method. This is called "self-synchronization< a i=2>” signal.

③However, most of thedata bandwidth in return-to-zero encoding is used to transmit "return-to-zero" and Waste is lost, which leads to a decrease in coding efficiency.

(3) UseManchester encoding to generate bit stream signal:

① The signal will jump in the middle of each symbol time. In the example shown in the figure below, a negative jump represents bit 1, and a positive jump represents bit 0.

The transition at the middle moment of the symbol represents both the clock and the data.

(4) UseDifferential Manchester encoding to generate bit stream signal:

① The signal will jump in the middle of each symbol time, but unlike Manchester encoding, the jump only represents the clock.

②The data is represented by whether the level at the beginning of the symbol changes. In the example shown in the figure below, a change represents a bit 0, and no change represents a bit 1.

5. Modulation method

(1) Basic modulation method:

①There are three basic modulation methods: amplitude modulation, frequency modulation, and phase modulation.

②One symbol can only contain 1 bit of information.

③If you want to make one symbol contain more bits, you can use a hybrid modulation method.

(2) Mixed modulation method:

①Becausefrequency and phase are related, that is, frequency is the rate of change of phase with time, soOnly one of frequency and phase can be modulated at a time.

②Normally, phase and amplitude can be combined to modulate ( different phase and The amplitudes can represent different code elements) through permutation and combination, which is called quadrature amplitude modulation QAM.

5. The ultimate capacity of the channel

1. Distortion and inter-code crosstalk

(1) The signal will inevitably be distorted during the transmission process.When the distortion is serious, the output end cannot restore the transmitted symbols based on the distorted waveform, and the signal waveform loses the code. Clear boundaries between elements, this phenomenon is called inter-code crosstalk.

(2) Factors related todistortion mainly include symbol transmission rate, signal transmission distance, noise interference, transmission media quality, etc..

2. Nye's criterion

(1) Nys's criterion points out that under assumed ideal conditions,in order to avoid inter-code crosstalk, there is an upper limit to the symbol transmission rate.

(2) The symbol transmission rate is the number of symbols transmitted per unit time.The highest symbol transmission rate of an ideal low-pass channel =2W Baud =2W symbols/ Seconds, the highest symbol transmission rate of an ideal bandpass channel = W Baud = W symbols/second, where W is the channel bandwidth (unit is Hz), Baud is Baud (i.e. symbols/second). (The actual maximum symbol rate that the channel can transmit is significantly lower than the upper limit given by the Nysslaw criterion)

(3) The symbol transmission rate is also called the baud rate, modulation rate, waveform rate or symbol rate. It has something to do with bitrate:

When 1 symbol only carries 1 bit of information, then the baud rate (symbol/second) and the bit rate (bit/second) are numerically the same are equal.

When one symbol carries n bits of information, when converting the baud rate into a bit rate, the value must be multiplied by n. (Data transmission rate = baud rate × the amount of information carried by each symbol)

(4)To increase the information transmission rate (bit rate), you must try to make each symbol carry more bits The amount of information requires the use of multiplexing (mixed modulation can be achieved) . Of course,Although you can try to make the symbols carry more bits, the ultimate information transmission rate of the channel is still limited by the signal-to-noise ratio of the actual signal when it is transmitted in the channel , because the noise in the channel will also affect the recognition of symbols by the receiving end, and the greater the noise power relative to the signal power, the greater the impact.

3. Shannon formula

(1) This formula is used to calculate the ultimate information transmission rate of a channel with limited bandwidth and interference from Gaussian white noise.

(2) The formula is as follows:

C: The limit information transmission rate of the channel (unit: b/s)

W: Channel bandwidth (unit: Hz)

S: the average power of the signal transmitted in the channel

N: Gaussian noise power in the channel

S/N: Signal-to-noise ratio, using decibels (dB) as the unit of measurement

(3) It can be seen from Shannon's formula thatthe greater the channel bandwidth or the signal-to-noise ratio in the channel, the higher the ultimate transmission rate of information.

(4) The information transmission rate that can be achieved on the actual channel is much lower than the limit transmission rate of this formula. This is because in the actual channel, the signal is also subject to other damages, such as various pulse interference, signal transmission Attenuation and distortion, etc., are not considered in the Shannon formula.

(5) When the channel bandwidth is certain, according to Nys's criterion and Shannon's formula, if you want to increase the information transmission rate, you must adopt a multiple system< a i=2> (better modulation methods) and effortsto improve the signal-to-noise ratio in the channel.

Guess you like

Origin blog.csdn.net/Zevalin/article/details/134929380