【Computer Network】Overview of Computer Network (Super Picture)

foreword

Computer network is the foundation that people who learn computers must learn, and it is very, very important. In future interviews, this will also be the focus of the question. So we have to pay attention.

I will also continue to update this column to summarize what computer networking is all about!

Internet overview

Network, Internet (Internet) and Internet

Network : It is composed of a number of nodes 结点that connect these nodes. The Internet can also be interconnected to form a network with a larger coverage. The Internet is a "network of networks", a true "internet". Internet : is the world's largest interconnected network (hundreds of millions of users and hundreds of interconnected networks). The difference between internet and internet :链路
insert image description here
多个网络路由器
insert image description here

insert image description here

insert image description here

The composition of the Internet

Edge part : Consists of all hosts connected to the Internet, this part is , yes 用户直接使用, used for communication (transmission of data, audio or video) and resource sharing.

The core part : consists of a large number of networks and routers connecting these networks. This part is yes 为边缘部分提供服务(provides connectivity and switching).
insert image description here

Three exchange methods

The three exchange methods are: 电路交换, 报文交换and分组交换

circuit switched

Circuit Switching : The method of telephone switching 接通电话线is called circuit switching.
insert image description here
From the perspective of the allocation of communication resources, an exchange is 动态的分配传输线路a resource in a certain way.

The three steps of circuit switching:

(1) Establish a connection (allocate communication resources)
(2) Talk (always occupy communication resources)
(3) Release the connection (return communication resources)

Communication resources can be compared to telephone lines

When circuit switching is used to transmit computer data, the transmission efficiency of the circuit is often very low.

message exchange

Packet switching : Also known as store-and-forward switching, it is one of the three ways of data exchange 报文整个地发送, one hop at a time. Message switching is the predecessor of packet switching.

A message is the entire block of data to be sent.

packet switching

Packet switching : Same as message switching 存储转发技术. Different from packet switching, before sending a packet, packet switching will consist of some necessary control information in 先把较长的报文划分成为一个个更小的等长数据段front of each data segment (header), which constitutes a packet (packet).加上首部

A packet is the unit that transmits data in the Internet. The header in the packet contains important control information such as destination address and source address, so that each packet can independently select the transmission path in the Internet and be correctly delivered to the destination of the packet transmission.
insert image description here

The idea of ​​packet switching comes from packet switching, which is also called store-and-forward switching. 交换过程的本质都是存储转发The difference between them is that the smallest unit of information in packet switching is a packet, while packet switching is a packet. Since the transmission and exchange are carried out in smaller packets, so 分组交换比报文交换快. The message exchange is mainly used in the public telegraph network.

During the entire transfer process:

Sender : Constructing packets, sending packets
Router : Buffering packets, forwarding and distributing
Receiver : accepting packets, restoring packets

Comparison of the three exchange methods

insert image description here

Performance Indicators of Computer Networks

Performance metrics can come from different perspectives 度量计算机网络的性能.

There are 8 performance indicators of our commonly used computer network: 速率, 带宽, 吞吐量, 时延, 时延带宽积, 往返时间, 利用率和丢包率.

Next, we will explain them one by one.

rate

The rate here refers to the speed at which data is transferred, also known as the data rate or bit rate. So if we want to learn the data rate, we must first know what is the amount of data and what is a bit.

Bit: The unit of data volume in a computer, that is, in information theory 信息量的单位, a bit is a 1 or 0 in a binary digit.

A bit (bit)is the smallest unit.

Commonly used data volume units and conversions between them:
insert image description here

Note that K here is 2 to the 10th power, which is 1024.

Rate: Hosts connected to a computer network are 传送比特的速率,also known as bit rate and data rate on digital channels.

(bit/s,b/s,bps)is the smallest unit of velocity.

Common data rate units:
insert image description here
Note that k is the cube of 10, which is 1000.

Here, their respective k is different, so all k should be written as corresponding numbers during calculation, and the unit of data volume should be converted to the smallest bit.

Such as:

bandwidth

Bandwidth : It is used to indicate what the communication line of the network can do 传送数据的能力, so the network bandwidth indicates what can pass from one point in the network to another point in unit time 最高数据率.

That is to say, the bandwidth is the maximum rate. Then the unit of bandwidth is the same as the unit of rate.

Unit: b/s, kb/s, Mb/s, Gb/s,Tb/s

In fact, there is another expression for bandwidth:

In the analog signal system, the bandwidth represents: the frequency range occupied by the various frequency components contained in the signal.

Unit: Hz, kHz, MHz,GHz

In fact, there is a close relationship between these two expressions. The wider the frequency bandwidth of a communication line, the higher the "maximum data rate" of the data it transmits.

Throughput

Throughput: Indicates in unit time 通过某个网络(或信道,接口)的数据量.

Throughput is often used as a measure of real-world networks to know how much data is actually going through the network.

Throughput is limited by the bandwidth (maximum rate) of the network.

delay

Delay : refers to the time required for a packet or packet to be transmitted from one end of a network to another , also known as network delay. It includes 发送时延, 传播时延, 处理时延, 排队时延.

Sending delay calculation:

send delay = 分组长度(b)/发送速率(b/s)

Propagation delay calculation:

propagation delay = 信道长度(m)/电磁波传播速率(m/s)

The transmission rate of electromagnetic waves is related to the medium of propagation, and different mediums have different propagation rates.

Common propagation medium:
insert image description here
processing delay and queuing delay are not easy to calculate. Generally ignored, we also ignore it here.

delay-bandwidth product

Delay-bandwidth product : As the name implies 时延与带宽的乘积, if the sender sends data continuously, the sender will stop when the first bit sent is about to reach the end point 又已经发送了时延带宽积个比特.

We can understand it as the number of bits sent again in the time delay is generated.

The delay-bandwidth product of a link is also called the link length in bits .

round trip time

In many cases, information on the Internet is not only transmitted in one direction, but interacts in two directions.

Sometimes we need to know the time required for a two-way interaction, so the round-trip time is also a very important performance indicator.

Utilization

Utilization : divided into 信道利用率and 网络利用率.
Channel utilization : used to indicate 某信道a percentage of the time is used (with data passing).
Network Utilization : 全网络的信道A weighted average of utilization.

Generally speaking, when the utilization rate of a certain channel increases, the delay caused by the channel also increases rapidly. Therefore, the channel utilization is not as high as possible.

Generally speaking, we want to control it below 50%.

Packet loss rate

Packet loss rate: that is 分组丢失, it refers to the transmission process within a certain time range 丢失的分组数量与总分组数量的比较.

There are two main cases of packet loss:

出现误码(1) The packet is discarded by the node during transmission . (2) The packet is discarded when it
reaches a packet switch.队列已满

Network congestion occurs when the traffic is large, so the packet loss rate reflects the network congestion.

computer network architecture

Common computer network architecture

We call the computer network 各层及协议集合the architecture of the network. In other words, the architecture of a computer network is a precise definition of the functions that the computer network and its components should perform.

We introduce three network architectures here: OSI体系结构, TCP/IP体系结构, 原理体系结构.

OSI Architecture

The OSI architecture is developed by the International Organization for Standardization, too 法律上的国际标准, and consists of a total of 7 layers.

insert image description here
However, the OSI architecture is too complex, the same function appears in multiple layers, and the implementation cycle is relatively long, so this architecture has not been popularized worldwide.

TCP/IP Architecture

The TCP/IP architecture is the most widely used Internet architecture in the world, too 实际上的国际标准, and it consists of 4 layers.

insert image description here
Compared with the OSI architecture, it removes the presentation layer and the session layer, and merges the physical layer and the data link layer into a network interface layer.

Principle Architecture

The TCP/IP architecture is the most widely used Internet architecture in the world, but it is not 适合进行教学使用, so the principle architecture is produced, which is a 5-layer network architecture.

insert image description here
Compared with the TCP/IP architecture, he splits the network interface layer of the TCP/IP architecture into a data link layer and a physical layer.

Our next introductory learning will also revolve around this architecture.

The Necessity of Layering Computer Network Architecture

Perhaps everyone here has such a question: Why does the computer network take a lot of trouble to layer just one thing? What is the basis for stratification?

Next we will solve this problem.

Why does the computer network take a lot of trouble to layer on one thing?

In fact, the computer network is not as simple as it seems, it is a very large and very complex system.

By layering it, we can transform a huge and complex system into several smaller problems, which are easier to study and deal with.

What is the basis for stratification?

As for why this layering is required, then we have to solve it step by step from generating a computer network system.

For example, we want to achieve information transfer between two hosts.

(1) First we have to think about us 要通过什么媒介(介质)进行传输.
(2) Also consider how the medium and the host are connected ( 采用什么样的物理接口).
(3) There is also in the medium 采用什么样的信号来表示比特0与1, because when we transmit information, it is converted into binary files, namely: 0 and 1.

This is our first step to solve the problem, we call it the physical layer .

After solving the above problems, we also need to consider the following questions:

(1) The number of hosts in the network is often more than the number of hosts involved in information transfer, so we need it again 如何标识哪些主机需要发送信息,哪些主机需要接受信息.
(2) What should we do when the data reaches the router for forwarding 从信号所表示的一串比特流中区分出地址和数据.
(3) If there is more than one host sending information, and they happen to use the same line for transmission, how can we make it 协调个主机争用总线.

This is a problem that needs to be considered in the process of data transmission, which we call the data link layer .

After we have solved the data link problem, we have to consider the network problem.

(1) How to 标识各网络以及网络中的各主machine.
(2) Router 如何进行转发, 如何进行路由选择.

We call it the network layer .

There are also many problems during transportation

(1) How to resolve based on between processes 网络的通信问题.
(2) 传输错误How to deal with it when it occurs.

We call it the transport layer .

Finally we have to consider:

(1)如何通过应用进程间的交互来完成特定的网络应用

We call it the application layer .

Finally, we stratify these problems to be solved:
insert image description here
it seems that the stratification is very reasonable!

Special terms in computer network architecture

The terminology in computer network architecture comes from the OSI standard system , but they still apply to the other two architectures (TCP/IP architecture, principle architecture).

Our common special terms are divided into three categories: 实体, 协议, 服务.

Next, we summarize them separately.

entity

entity:任何可发送或接收信息的硬件与软件进程。

There are entities in each layer. Below we use small squares with letters to represent entities in each layer.
insert image description here

Peer entity:收发双方相同层次中的实体

This is easy to understand after knowing the entities. The relationship between peer entities is shown in the figure:
insert image description here

protocol

protocol:控制两个对等实体进行逻辑通信的规则集合

As shown below:
insert image description here
Each protocol basically has three elements.

Three elements of the agreement : 语法, 语义,同步

These three elements specifically represent:

Grammar : Defined by 交换信息的格式.
Semantics : Define what the sender and receiver want 完成的操作.
Synchronization : Defines both sender and receiver 时序问题.

Serve

Service : A logical communication between two peer entities under the control of a protocol 本层能够向上一层提供服务.
insert image description here

For services we need to know:

(1) To implement this layer protocol, also 需要使用下面一层所提供的服务.
(2) The agreement is yes “水平”, the service is yes “垂直”.
(3) The entity can see the service provided by the adjacent lower layer, but does not know the specific protocol for realizing the service. That is, 下面的协议对上面的实体是“透明”的.

Service Access Point相邻的两层的实体交换信息的逻辑接口 : Used to distinguish different service types in the same system .

Such as:

The service access point of the data link layer is the "type" field of the frame.
The service access point of the network layer is the "protocol field" in the IP datagram header.
The service access point for the transport layer is the "port number".

Service primitives : 上层The use of services provided by the lower layer must be passed 与下层交换一些命令, and these commands are called service primitives.
insert image description here
Protocol Data Unit PDU : A protocol data unit called this layer that 对等层次is transmitted between .数据包

Service data unit SDU : 同一系统内, 层与层之间交换的数据包called service data unit.

insert image description here
At the same time, according to the figure, you should also see that multiple SDUs can be combined into one PDU; one SDU can also be divided into several PDUs.

Epilogue

Computer network is a very important test site in our future interviews, and it is also a very basic thing, we must pay attention to it. Do more practice on the calculation questions.

This column is continuously updated…

Guess you like

Origin blog.csdn.net/apple_51673523/article/details/123239437