1. Day01-tcp /IP architecture supplement

Using the concept of protocol stack, explain the common client-server mode of operation in the Internet:

Hosts A and B in Figure 1-25 have their own protocol stacks. The application processes (client processes) on host A are located in the highest application layer. This client process makes a request to the server process at host B’s application layer to establish a connection. The server process in host B then accepts the request from A’s client process. All of this communication actually requires the use of services provided by the layers below. But if you consider only the interaction between the client process and the server process, you can think of their interaction as the horizontal dotted line in the figure.

Figure 1-25 Interaction between client processes and server processes at the application layer

Get into the business

1. Basic concepts of physical layer

The physical layer deals with how to transfer a stream of data bits over a transport medium that connects various computers, rather than referring to a specific transport medium. The main task of the physical layer is described as: to determine some characteristics of the interface with the transmission media, that is, to define standards

  • Mechanical properties: define the properties of physical connections, document the specifications, interface shapes, number and arrangement of leads used in physical connections, such as structure shape, size, number of leads
  • Electrical characteristics: Voltage range, impedance matching, transmission rate and distance limitation of signals on a line when specifying the transmission of binary bits, for example, specifying the voltage range (-5v to + 5V)
  • Functions and features: indicate the meaning of a level on a line and the purpose of the signal line of the interface component. For example, -5V represents 0 and + 5V represents 1
  • Process characteristics: Also known as procedural characteristics, which specify the working steps and timing relationships of related components when establishing connections

Data is mostly transmitted in parallel in computers. But data over communication lines (transmission media) is usually transmitted sequentially (for economic reasons), bit by bit in chronological order. Therefore, the physical layer also has to complete the transfer mode transformation.

2. Basic knowledge of data communication

2.1. Data communication system model

As shown in the figure, a data communication can be divided into three major parts, namely the source system (or sender, sender), the transmission system (or transmission network) and the destination system (or receiver, receiver).

The source system generally consists of the following two parts:

  • Source: The source device generates the data to be transmitted, for example, the input of Chinese characters from the KEYBOARD of a PC, and the PC generates an output stream of digital bits. A source point is also called a source station or information source.
  • Transmitter: Usually, the digital bitstream generated by the source point is encoded by the transmitter before it can be transmitted in the transport system. A typical transmitter is a modulator. Many PCS now use built-in modems (including modulators and modems) that are invisible to the user outside the PC.

The target system generally consists of the following two parts:

  • Receiver: Receives signals from the transmission system and converts them into information that can be processed by the destination device. A typical receiver is a demodulator, which demodulates the analog signal from the transmission line, extracts the message placed at the sender, and restores the digital bitstream generated at the sender.
  • Destination: The destination device takes a stream of digital bits from a receiver and outputs the information (for example, displaying Chinese characters on a PC screen). The destination is also called the destination station, or the destination.

The transmission system between the source system and the destination system may be a simple transmission line or a complex network system connected between the source system and the destination system.

2.2 Common terms for communication systems

  • The purpose of communication is to send messages. Such as voice, text, image, video and so on are messages.
  • Data is an entity, usually a meaningful sequence of symbols, that carries messages. The representation of this information can be processed or generated by a computer.
  • A signal, “signal,” is an electrical or electromagnetic representation of data.

Classification of signals

  1. Analog signal, or continuous signal – the values of the parameters representing the message are continuous.
  2. Digital signals, or discrete signals — the values of parameters representing messages are discrete.

2.3. Some basic concepts about channel

channel

A channel is not the same as a circuit. A channel is usually used to represent a medium that transmits information in a certain direction. Therefore, a communication circuit usually consists of a sending channel and a receiving channel.

The way in which information is exchanged between two parties

  1. Unidirectional communication is also called simplex communication, that is, there can only be communication in one direction and no interaction in the other direction. Radio or cable broadcasting and television broadcasting fall into this category.
  2. Two-way alternating communication is also known as half duplex communication, that is, both sides of the communication can send information, but not both sides at the same time (of course, cannot receive at the same time). In this form of communication, one party sends and the other party receives, and then the other way around after a certain period of time.
  3. Two-way simultaneous communication is also called full-duplex communication, that is, the two parties can send and receive information at the same time.

One-way communication requires only one channel, while two-way alternating or simultaneous communication requires two channels (one in each direction). Obviously, two-way simultaneous communication is the most efficient transmission.

Baseband signal

The signal from the source is often referred to as the baseband signal. The numbers 0 and 1 are directly represented by two different voltages and sent to the digital channel for transmission (baseband transmission). Data signals, such as computer output representing various text or image files, are baseband signals. Baseband signals often contain more low-frequency components, and even dc components, and many channels cannot transmit this low-frequency component or DC component. In order to solve this problem, it is necessary to base band signal modulation.

modulation

Modulation can be divided into two broad categories:

  • Baseband modulation: Only the waveform of the baseband signal is transformed so that it can be adapted to the channel characteristics. The transformed signal is still baseband signal. Since baseband modulation is the conversion of a digital signal to another form of digital signal, this process is more commonly known as coding.

  • The other type of modulation requires the use of a carrier to modulate, moving the baseband signal to a higher frequency band and converting it into an analog signal, which can be better transmitted over an analog channel. A signal modulated by a carrier is called a band signal (that is, it can travel through a channel only over a range of frequencies), while modulation using a carrier is called bandpass modulation.

2.4. Symbol, rate, Baud, bandwidth

element

Symbol refers to a signal waveform with a fixed length (digital pulse), representing the basic waveform of different discrete values, which is the measurement unit of digital signal in the digital channel. The signal within this length is called the k-base symbol, and the length is called the symbol width. When there are M discrete states of symbols (M is greater than 2), the symbol is the m-base symbol.

A code element can carry multiple bits of information. For example, when using binary encoding, there are only two different codes, one representing the 0 state (low level) and one representing the 1 state (high level).

4 base code: there are 4 discrete states of the code, corresponding to 4 different signal waveforms, 00, 01, 10/11

Rate, baud, bandwidth

Rate, also called data rate, is the transmission rate of exponential data, indicating the amount of data transmitted per unit time. Can be expressed in terms of symbol transfer rate and information transfer rate.

  • Symbol transmission rate: alias symbol rate, waveform rate, modulation rate, symbol rate, etc. It indicates the number of symbols transmitted by the digital communication system per unit of time (also known as the number of pulses or the number of signal changes), in unit of Baud. 1 baud indicates that the digital communication system transmits one symbol per second. Symbols can be multi-base or binary, but the symbol rate is independent of the base number. That is, how many codes are transmitted in 1s

  • Information transmission rate: alias information rate, bit rate, etc. It refers to the number of binary codes (bits) transmitted by the digital communication system in a unit of time. The unit is bit/second (b/s). 1s how many bits to transmit

  • Relation: If a symbol carries n bits of information, the symbol transmission rate of M Baud corresponds to the information transmission rate of M x N bit/s.

Bandwidth: Indicates the “highest data rate” that can pass from one point to another on a network in a unit of time. It is often used to indicate the capacity of a network’s communication lines to transmit data. The units are b/s.

2.5. Nye’s criterion and Shannon’s theorem

Don’t want to write, read

Shannon’s theorem

3. Common coding methods

  • Non-return to Zero (NRZ) : Positive level represents 1, negative level represents 0 [every bit has no jump]
  • Return to zero system: positive pulse represents 1, negative pulse represents 0.
  • Manchester code: the upward jump of the bit-period center represents 0 and the downward jump of the bit-period center represents 1, but it can also be defined the other way around.
  • Differential Chester coding: there is always a jump at the center of each bit. The bit-start boundary with a jump represents 0, while the bit-start boundary with no jump represents 1.
  • Reverse non-return to zero coding: signal level reversal means 0. Signal level unchanged means 1
  • 4 b / 5 b code

It can be seen from the signal waveform that Manchester encoding and differential Manchester encoding produce higher signal frequencies than the non-return to zero system. From the point of view of self-synchronization, the non-return to zero system cannot extract the signal clock frequency from the signal waveform itself (this is called no self-synchronization), whereas the Manchester and differential Manchester codes have self-synchronization capability.

4, basic bandpass modulation method (digital data modulation into analog signal)

Digital data modulation converts digital signals to analog signals at the sender and analog signals back to digital signals at the receiver, corresponding to the modulation and demodulation processes of the modem respectively.

Baseband signals often contain more low-frequency components, and even dc components, and many channels cannot transmit this low-frequency component or DC component. In order to solve this problem, it is necessary to base band signal modulation. The basic binary modulation methods are as follows:

  • Amplitude modulation (AM) : The amplitude of the carrier varies with the baseband digital signal.
  • Frequency modulation (FM) : The frequency of the carrier varies with the baseband digital signal.
  • Phase modulation (PM) : The initial phase of the carrier varies with the baseband digital signal.

In order to achieve a higher information transmission rate, a more technically complex multi-system of amplitude and phase mixed modulation must be adopted. For example: Quadrature Amplitude Modulation (QAM).