2024 Postgraduate Entrance Examination 408-Computer Network Chapter 1-Computer Network Architecture Study Notes

Article directory

Preface

Currently preparing for the 24 Postgraduate Entrance Examination, I will now summarize and organize the knowledge points learned in 408 of 24 Computer Kings.

Blogger blog article directory index: Blog directory index (continuously updated)

Computer networks are everywhere, and there are many real-life network scenarios as follows :

image-20230722173008319

  • RTT refers to the round-trip transmission delay. When you send an instruction to ask the person to take a step forward, and then the game server receives the instruction and returns a corresponding response to you, this delay is called RTT.

image-20230722173021323

  • Blockchain: Every ledger can be seen by everyone in the cloud, also through the network.

The actual computer network architecture is divided based on levels , and each level implements some specific functions.

image-20230722173106524

The mind map of the entire chapter is as follows:

image-20230722173146710

image-20230722173311893

  • The hierarchical structure is like a class; examples are ISO/OSI (seven layers) and TCP/IP model (four layers).

In fact, there are five layers in the postgraduate entrance examination: physical layer, data link layer, network layer, transport layer and application layer.


1. Overview of Computer Networks

1.1. Concept and function

1.1.1. The concept of computer network

image-20230722174727549

  • Neural network in the human body: a network system composed of many neurons.
  • Telecommunications network: A mesh system linked by telephone lines and links.
  • Cable TV network: A recorded program is transmitted to thousands of households through cables and optical cables, forming a very large mesh system.

The three networks often referred to refer to : telecommunications network, cable TV network, and computer network, which are circled in the picture above.

At present, these three networks have a very trendy name: triple network integration, which is realized through the very critical medium of computer network.

  • The current society is a highly information-based society, and digital technology is widely used in computer networks. We can convert all media, text, pictures, videos, etc. into a digital bit stream of zero or one, and then put it on the link for transmission, so that communication between different nodes can be achieved. Sharing of resources.

We can encode the audio signals in the telecommunications network into digital signals. We can encode the images and audio in the cable TV network into digital signals and then put them on the link for transmission. In this way, we can rely on the computer network to convert the cable TV signals into digital signals. , network and telecommunications networks are integrated.

There are currently four popular networks : including the power grid.

image-20230722174704064

  • For example, street lights: It is very important to control, manage and maintain street lights. Telecom networks, computer networks, and cable TV networks can be combined to implement wireless street light monitoring solutions. At this time, if someone steals the path, the alarm information will be transmitted to the person in charge in real time. in electronic equipment.

计算机网络: It is a computer system that connects dispersed computer systems with independent functions through communication equipment and lines, and realizes resource sharing and information transmission through fully functional software.

image-20230722175201871

  • The line is a logical line, because this line can be wireless or wired (for example, connecting to a LAN such as WIFI), realizing a logical connection, and then using fully functional software to realize resource sharing and information transfer.

It is not enough to just establish a network connection. Software support is also needed to realize resource sharing and information transfer between each terminal.

Introduction to some terms :

  • A computer network is 互连的、自治a collection of computers.
  • 互连: Interconnection through communication links.
  • 自治: There is no master-slave relationship between each node, and it is highly autonomous.

1.1.2. Functions of computer networks

Function 1. Data communication

image-20230722193030132

Data files can be transferred between two hosts.


Function 2. Resource sharing

The behavior of other computers on the same computer network using the computer resources of a certain computer and sharing hardware, software, and data .

  • Hardware sharing: For example, a network printer, connect the printer to a network, and set a fixed static IP address for the printer. Then our mobile phone can be connected to the printer through the network. This allows everyone to share this printer.
  • Software sharing: For example, one computer remotely accesses another computer, and then uses this computer to remotely access another computer, and then uses the office software on the other computer, or draws pictures. At this time, software resource sharing is realized.
  • Data sharing: For example, uploading or downloading files on Baidu Wenku is the sharing of data. The sharing of network resources is not necessarily free, and there may be charges.

Function 3. Distributed processing

Scenario : If one computer is overloaded, multiple computers can be used to undertake different parts of the same work task, and the work efficiency will become higher.

For example : A very typical application is a distributed platform like hadoop, which can perform high-speed operation and distributed storage.


Function 4. Improve reliability (distributed processing extended function)

If a host in the distributed processing network goes down, another machine can be used as a replacement machine.


Function 5. Load balancing (also an extended function of distributed processing)

After using distributed processing, multiple computers can each undertake part of the work tasks, which is relatively balanced.


1.1.3. Internet development stage

Phase One: ARPANET

During the Cold War between the United States and the Soviet Union, the U.S. Department of Defense had a single, very centralized point. Whether this center was afraid of being destroyed by nuclear weapons, once the center was destroyed, the national situation system would be paralyzed because all nodes were attached to this one. I only know how to focus on the center, but now I’m wondering if I can design a more decentralized command system?

  • An envisioned command system: The command system is composed of dispersed command points. Once one of the command points is blown up, there will be other nodes that can take over the work and can also communicate with each other.

The organization is the U.S. Defense Advanced Research Projects Agency (ARPA), which designed a network called ARPANET .

image-20230722194450128

The prototype of ARPANET is composed of four nodes distributed in different areas, connected through a wireless packet switching network and a satellite communication network. If one of the nodes disappears, the other nodes can still continue to work and communicate.

image-20230722194632000

At the same time, ARPANET involved many other terminals and some computers after each node, thereby expanding the scale of ARPANET. However, one drawback is that ARPANET can only be connected to the same type of network, and the ARPANET can only connect to the same type of network. With the increase in the amount of information, their systems can realize the interconnection of different networks, that is, an interconnected network interconnected network(referred to as internetthe Internet).

image-20230722194857325

At this time, for this goal, a protocol called "IP" emerged TCP/IP协议, which can realize the connection of different networks. The IP protocol can realize the connection of different networks. The TCP protocol is a basic communication protocol that helps IP achieve reliable transmission. Network interconnection can be achieved by combining these two protocols.

For ARPANET, this protocol was officially accepted in 1983, and an old protocol was used before that. At the same time, the Internet was chosen as the main computer communication system, and eventually the Internet was often referred to as the Internet .

  • So ARPANET is the predecessor of the Internet.

image-20230722195147754

The network essentially consists of several nodes and links connecting these nodes, which are called 节点.

For the links between nodes, a cloud is called a network. Connecting networks through routers forms a large network, which is the Internet.

image-20230722195603899

Regarding the relationship between three nouns: 网络, 互联网, 因特网.

  • A network connects all computers together, and the Internet connects many networks together. The Internet is the largest Internet in the world.

Stage Two: Three-Level Structure

In 1985, the National Science Foundation (NSF) of the United States built a computer network around six large-scale computer centers, the National Science Foundation Network NSFNET.

Such a network is composed of a three-layer structure. The bottom layer is the campus network or enterprise network. If users at the bottom layer want to connect to the Internet, they need to connect to the second-layer regional network, and then connect to the second-layer regional network. At the first layer of the backbone network, a three-layer network structure with relatively clear logic is formed .

image-20230722200440585

  • This three-level computer network structure actually covered most schools and research institutes in the United States at that time, and became a major component of the Internet.

The third stage: multi-level ISP structure (understanding IXP)

With the development of technology, more and more users and companies are connected to the Internet, which will lead to a sharp increase in the amount of information on the network. The Internet controlled by the United States at that time can no longer meet a large number of requirements. At this time, the United States The government handed over the backbone of the Internet to some private companies to operate, and began to charge units for access to the Internet.

  • These third-party companies are called ISP.

ISP(因特网服务提供者/因特网服务提供商): It is a company that comprehensively provides Internet access services, information services and value-added services to users, such as China Telecom, China Unicom, China Mobile, etc. And it is divided into backbone ISP, regional ISP and local ISP.

  • Whether on campus or in the future, we all need to pay Internet fees. This is the service fee to the ISP. By paying the service fee, we can use the ISP's service to get an IP address to surf the Internet.

image-20230722201519434

  • To put it simply: there is a very large IP pool around the world, which is managed by the Internet Management Agency. If ISP providers want to provide services to users and allocate IPs to them, they need to obtain some IP addresses in this IP pool to obtain The IP address of a network segment can now access the Internet.

Understanding ISP :

  • As long as each local ISP installs a router to connect to the regional ISP, and then the regional ISP also has a router to connect to the backbone ISP, then all the data packet forwarding tasks in the Internet can be completed. At this time, we can surf the Internet and access the resources of various websites. .
  • We can search the IP address on Baidu to see the local ISP you currently belong to.

image-20230722201839366

Question : If as traffic surges, people's requirements for the network are getting higher and higher, then do all network requests need to enter the backbone ISP before network data can be exchanged?

  • People began to study how to forward data faster, and a concept " " was born 因特网交换点IXP.

Originally, the communication between a and b needs to go through layer after layer of ISP structure, through the local ISP to the regional ISP and then to the backbone ISP. At this time, if IXP is available, then we can directly allow the two networks to be connected. At this time, There is no need for a third network to forward packets.

image-20230722202249032

Effect : Greatly improve the speed of information transmission and resource sharing.


Learning review and important summary

image-20230722202402533


1.2. Composition and classification

1.2.1. Components of computer network

1.2.1.1. Components (hardware, software, protocols)

Composition : hardware, software, protocol (a collection of rules and conventions).

image-20230722204255165

  • 硬件: End systems (systems at the edge) and intermediate devices such as routers and switches.
  • 软件: Attached to the end system, even this intermediate device also has certain software to deploy the software to the hardware.
  • 协议: Protocols shuttle through various hardware to form a computer network. Each level of the computer network has many protocols. According to this protocol, it is stipulated how data is encapsulated, packaged, and transmitted.

1.2.1.2. Working method (edge ​​part, core part)

Working method : edge part, core part

edge part

边缘部分: It is composed of a series of end systems. These end systems include not only some computers, but also some very large servers, mainframe computers, and some very small network cameras that capture some information in real time and This information is released in real time.

  • 端系统: System at the edge end.
  • 端和端的通信: Refers to process communication between two end systems. For example: a process on host A, such as QQ, and a process on host B, such as QQ, directly send and receive messages. This is process communication between the two end systems.

image-20230722210822353

Communication between two ends (directly used by users) includes two methods : C/S method [or B/S method] and P2P method.

  • C/S方式:client/server communication. For example, chatting and sending messages between WeChat (clients) are forwarded through the server (server). [B/S is the browser and server]
  • P2P方式(peer-to-peer): peer-to-peer connection. All hosts have two identities. One is the server that provides services, and the other is the user who uses the service. It can act as either a client or a server.

P2P example : For example, user a has a 500M movie. At this time, B, C, and D all want to watch it. At this time, he first sends 200M to B, and then B sends 150M to C, and C obtains the remaining movie files from , when C gets it, it becomes D. A, B, and C all have the movie resources at this time, and they can all send resources to D. At this time, D can obtain the resources the fastest.

image-20230722210701508

Conclusion : B, C, and D can serve as both clients and servers. Each of them not only assumes the upload function, but also enjoys the download service. The more hosts there are, the faster the download.

core part

核心部分: Only the edge part of the computer network is not enough. Some services of the core part are also needed. By providing services through the core part, the edge part can realize communication between end systems.

image-20230722211024211

Brief description : It mainly provides services to the edge part, including routers and some intermediate devices, and some networks are connected together to form a computer network.


1.2.1.3. Functional composition (communication subnet, resource subnet)

The two main functions of computer networks are data communication and resource sharing. According to these two functions, computer networks can be divided into: communication subnets and resource subnets.

  • 通信子网: Realize data communication.
  • 资源子网: Realize resource sharing/data processing.

According to the OSI reference model, it can be divided into seven layers . For the lower three layers, the communication subnet is composed of various transmission media communication equipment and network protocols, which allows this network to have the capabilities of transmission, switching, control and storage, and can also implement Networking, data communication between computers.

image-20230722211948819

The upper three layers are mainly responsible for encapsulating data, and the lower three layers are mainly responsible for sending this data to the road. They play a very important role in integrating the transmission layer in the middle.

  • Transport layer: Mainly to bridge the gap between the services required by the above three layers and the services provided by the network layer, and to shield some details of the communication subnet from high-level users.
  • Practical example: You place an order in an online mall. At this time, the merchant will pack the package according to the baby in the order. Then after the baby is packaged, it needs to be delivered. As for the specific next stop, where to deliver it and how to deliver it. We don’t need to worry about getting it on the bus, whether it’s air freight or mailing. This intermediate transmission process is what the transport layer has to do.

1.2.2. Classification of computer networks

1.2.2.1. According to distribution range (including the difference between local area network and wide area network)

According to the distribution range : wide area network WAN, metropolitan area network MAN, local area network LAN, personal area network PAN

  • 广域网WAN: The range is very wide, ranging from tens to thousands of kilometers. The WAN is considered the core of the Internet. Its task is to run some data to be sent between hosts over relatively long distances across countries.
  • 城域网MAN: A network that can cover a city.
  • 局域网LAN: Geographically small, for example, a school or an office building is within the scope of the LAN.
  • 个人区域网PAN: Where individuals work, a network that connects some of their electronic devices, such as computers, smart watches, bracelets, etc., through wireless technology is called a wireless personal area network, with a range of about 10 meters.

Regarding the difference between LAN and WAN :

① It cannot be determined based solely on physical distance, but must be determined based on the actual technology used.

For example: My neighbor and I are very close to each other, but since we each use our own wifi, we send text messages directly to communicate. This is actually an exchange and transmission on the network. This network is the Internet, although we are physically far apart. Recently, but WAN technology is actually used for communication.

② Local area network uses broadcast technology ; WAN uses switching technology .

How to remember it skillfully ?

  • Example of LAN broadcast technology: For example, in a village, we only need to turn on the broadcast and roar, and the whole village can hear it.
  • Example of WAN switching technology: You are in one county, and then you want to talk to people in another province. At this time, it is not a matter of yelling. What you need to use at this time is switching technology, through routers and other intermediate devices. Data is forwarded, stored and exchanged bit by bit.

1.2.2.2. Divided according to users (public network, private network)

Divided according to users : public network, private network.

  • 公用网: Generally, they are some large-scale networks built by state-owned or private investors, including China Telecom, China Unicom, and China Mobile.

image-20230722215354642

  • 专用网: A certain department or industry needs to build a network for its own special work. For example, the military, government, or many of our current Internet companies have an office, and the entire office uses a private network, which is an intranet.

image-20230722215401021


1.2.2.3. Divided according to switching technology (circuit, message, packet)

Divided according to switching technology : circuit switching, message switching, packet switching

  • These three exchanges actually talk about how data is exchanged.

电路交换: The characteristic is that the two parties passing through during the call will completely occupy the resources in the middle and cannot be used by others.

  • Circuit switching principle: ① Establish a connection and occupy a communication resource. ② When building a connection, both parties occupy resources all the time. ③ Release the connection and disconnect after hanging up the phone.
  • For example: Making a phone call is circuit switching, which involves several steps. First, if the other party answers the call, a link will be established. If someone else calls you, it will appear that the call is in progress and cannot be interrupted. At this time, it means that the line is busy. .

报文交换、分组交换: Both use the store-and-forward method, but they are different for the subject.

  • Introduction to store and forward: If a piece of data (message or packet) is placed on the network for transmission at this time, the data may be handed over to a router, and then the router will store the message or packet and check where it is going . If there are several routes at this time, a closer router will be selected to forward it to it.
  • image-20230722215426743

The difference between message switching and packet switching : the main reason is that the main body is different. A message is a large whole file, while a packet is to split a whole message into groups.

What message switching and packet switching have in common is that they both use store-and-forward, and the lines are occupied segment by segment, not exclusively occupied like circuit switching. If there is other data, it is also possible to send it on the same link.


1.2.2.4. Classification according to topology (bus, star, ring, network)

Topology : Transform the nodes in the network (can be routers, switches, or hosts of segment systems) into small particles and small circles, then abstract the communication link into a line, and combine this circle with The grouping of lines together is called a topology.

总线型: All end systems or nodes are connected to this bus.

image-20230722215946456

星型: Spread out from the middle node to connect each node.

  • Regarding the star pattern, we mainly examine the relationship between the number of nodes and the number of intermediate links. If there are 6 nodes, then five links are needed.

    image-20230722215958037

环型: Connect all nodes together to form a ring.

image-20230722220005758

网状型: Commonly used topology in WAN, many-to-many relationship.

image-20230722220024054


1.2.2.5. Classification according to transmission technology (broadcast, point-to-point)

According to transmission technology, it is divided into : broadcast network, point-to-point network

广播式网络: Shared public communication channel

  • Detailed introduction: It is a kind of network in the local area network that shares a public communication channel. This bus topology is usually used to share such a public channel in the middle. All computers connected to the network can enjoy this channel, and When a computer sends a packet to this shared channel, all computers will receive the packet.

点对点网络: Use packet store-and-forward and routing mechanisms.

  • Detailed introduction: It usually corresponds to the wide area network. The wide area network is basically a point-to-point network. It means that if two hosts in the network want to communicate but are not directly connected, it will require many intermediate nodes to realize the storage, forwarding and processing of packets. Routing.
  • Difference from broadcast: not all computers can receive the information sent, only the target computer can receive it.

Knowledge review mind map

image-20230722220655430


1.3. Standardization work and related organizations

1.3.1. Standardization work

If there are no unified standards, for example, the versions of online games are inconsistent, then some games will prompt the following message when starting:

image-20230723140617761

If you want to achieve interconnection between hardware and software from different manufacturers, you must follow unified standards.


1.3.2. Standardized classification (statutory, de facto standards)

Standards are classified into : legal standards, de facto standards

  • 法定标准: Formal, legal standards established by authoritative organizations. It can be a domestic or international legal standard. The more common one is the OSI standard mentioned in the book.
  • 事实标准: The products of certain companies have become mainstream in the competition. As TCP/IP has been around for a long time, the protocols and technologies in these products have become standards.

image-20230723140947501

  • The Nano SIM card is a small card that Apple started using in the iPhone 5. Once the micro card was adopted, other manufacturers followed Apple's lead. At this time, the NANO SIM card has become a de facto standard.

1.3.3, RFC and its four stages of development into Internet standards

RFC(Request For Comments,请求评论): Internet standard form.

There are four stages for RFC to become a formal Internet standard :

1) The Internet Draft is not an RFC document at this stage.

  • First of all, it cannot be regarded as an RFC document at this stage. It can only be said to be an idea. If you want to formulate a standard at the moment, you can first draw up an Internet draft. In fact, it is one that I personally think can be established. standard.

2) The Proposed Standard is called an RFC document from this stage.

  • After it is built, you can send an email to: [email protected]. If they reply that you think it is great, then you will enter the next stage; if they reply that you are welcome to come back next time, it means that it has not been passed. .

3) Draft Standard

  • You can start requesting comments, put the RFC document on the Internet, and wait for many people to give you modification comments to further improve the RFC document. After improvement, a draft standard will be formed.

4) Internet Standard

  • Now entering the final stage, the draft standard will be submitted to the IETF and IAB organizations for review. If the last step is passed, then the Internet Draft will become an Internet standard.

Note : After 2011, the third phase was cancelled.


1.3.4. Organizations related to standardization work

国际标准化组织(ISO): OSI model, HDLC protocol.

国际电信联盟(ITU): Establish communication rules. (Responsible for telecommunications and telephone calls).

电器和电子工程师协会(IEEE): Academic institutions, IEEE802 series standards, 5G.

Internet工程任务组(IETF): Responsible for the formulation of Internet-related standards, RFC xxxx.

The most important of these is the International Organization for Standardization ISO .


mind map moment

image-20230723142742242


1.4. Performance indicators

1.4.1. Rate

速率: Data rate or data transfer rate or bit rate. The rate at which hosts connected to a computer network transmit bits of data over a digital channel.

  • 比特: Indicates 1 or 0, the smallest unit.

The units are b/s, kb/s, Mb/s, Gb/s, Tb/s

Next is the rate conversion unit and storage capacity comparison :

image-20230723143610845

Note : The data transfer rate (communication field) is 10 3 as the conversion unit, and the storage capacity (described size) is 2 10 as the conversion unit, 1024.


1.4.2. Bandwidth

带宽: Originally refers to the frequency bandwidth of a certain signal, that is, the difference between the highest frequency and the lowest frequency, the unit is Hertz (Hz).

  • In computer networks, bandwidth is used to represent the ability of a network's communication lines to transmit data. It usually refers to the "highest data rate" that can pass from one point to another in the network per unit time. The unit is bit/s, for example: b/s, kb/s, Mb/s, Gb/s.

Bandwidth example : the highest speed that a network device can support. For example, there is a switch with a 100M port. That is to say, the maximum transmission rate of the 100M port of the switch is 100M bits per second. If this switch When connected to a 100M network card, the two can communicate together. During the communication process, the maximum number of bits this switch can transmit to the channel or link per second is 100M bits.

Note : Bandwidth refers to the rate at which data is sent at this ingress location , not the rate at which it propagates over the link . In fact, it is propagated in the form of electromagnetic waves on the link. Bandwidth is the highest data rate that the sending end can send, which is the ideal ultimate transmission data rate.

Let’s use a diagram to understand the difference between rate and bandwidth :

Case 1 : We have a link here: ① First, the link bandwidth = 1Mb/s. After conversion, the host can send 1 bit of data to the link in 1us. ②The propagation speed is 2x10 8 m/s, and the electromagnetic wave can propagate forward 200m in 1us.

The following is the number of bits in the link and the transmission situation at 1us, 2us, and 3us:

image-20230723151928093

  • A bit is sent out at the 1us. At the 2us, the first bit is transmitted 200 meters, and 1 bit is sent again at this time; at the 3us, a bit is sent again, and the bit sent in the previous 2us Transmitted 100 meters at the same time.

Case 2 : Next is the case where the link bandwidth is 2Mb/s:

image-20230723152310991

  • Compared with the previous 1Mb/s, the difference is that one bit is sent every 1 second, while the current one is sending two bits per second. The picture shows the situation in the link at 3us.

Conclusion : If the bandwidth becomes larger, it means that more data or data bits are injected into the link per unit time, but it will not affect the speed of the bits propagating on the link. It can only be said that the transmission speed becomes faster. .


1.4.3. Throughput

For example : For example, at the entrance of a scenic spot, how many people come in and out within ten minutes is the throughput of the entrance of the scenic spot.

吞吐量: Indicates the amount of data passing through a certain network (or channel, interface) within unit time. Units are b/s, kb/s, Mb/s, etc.

First of all, we have a host and switch. Our own computers and switches have 100M ports, so the link bandwidth is 100Mb/s.

  • 百兆口: Our computer’s fastest sending rate is 100Mb/s, and the switch’s sending rate at the same time is also 100Mb/s.
  • **What is the receiving rate of the host and switch? **The receiving rate is determined by the corresponding buffer size.

image-20230723153646313

At this time, the host starts to access the web pages in the two servers. For server 1, the upper one has a rate of 20Mb/s, and for server 2, the lower rate is 10Mb/s. This rate is actually affected by the server's own sending rate. limited.

image-20230723154528705

  • At this time we can see the bandwidth (ideal state, generally the transmission rate of the server and host is smaller than the bandwidth). At this time we can calculate the throughput on the current link as 20Mb/s+10Mb/s = 30Mb /s , which is the sum of the transfer rates of the two servers.

Simply understand the difference between bandwidth, rate, and throughput rate : link bandwidth is actually the maximum data volume of the bandwidth standard (ideal), throughput (actual, all links added together), rate (referring to what a single server or a single host can rate of emission).

Easy-to-understand example : For example, when eating instant noodles, my personal appetite can eat up to 100 bowls (bandwidth). The number of bowls does not depend on the manufacturer. At this time, one manufacturer gave me 20 packs per second (rate), and the other manufacturer gave me 30 per second. Packets (rate), then I can only eat 50 packets (throughput) in 1s.


1.4.4. Time delay

时延: Refers to the time required for data (messages/packets/bit streams) to be transmitted from one end of the network (or link) to the other end, also called delay or delay. The unit is s.

Delay includes four major categories :

  1. Send delay (transmission delay).
  2. propagation delay.
  3. Queuing delay.
  4. Processing latency.

①Sending delay

发送时延(传输时延): Refers to the time required from the first bit of the packet to the last bit of the packet.

The sending delay is affected by two factors : ① How long the data is. ②The speed of sending.

Official :发送时延 = 数据长度/信道带宽

  • The channel bandwidth refers to the transmission rate. In real life, the transmission rate or sending rate cannot reach the bandwidth of the channel, and when doing questions, we generally use bandwidth as the sending rate !

For example : We have 10bit data and the bandwidth is 10b/s. At this time, our sending delay is 10bit / (10b/s) = 1s. At this time, our sending delay is 1s. This is actually the time it takes for us to push all the data to the channel.

image-20230723164306105


②Propagation delay

传播时延: is the time it takes to propagate a certain distance on the channel, depending on the electromagnetic wave propagation speed and the link.

  • Channel length, link length can be understood as one end of the medium, and the link channel can be optical fiber, coaxial cable, etc.
  • The transmission speed of electromagnetic waves is generally 3x10 8 bit/s. However, in practical applications, it is transmitted on a solid medium, so there will be a certain loss. The final speed is generally 2x10 8 bit /s.

Why are electromagnetic waves transmitted on the channel? Shouldn't it be bit streams or signals being transmitted?

  • Our signal will undergo certain modulation techniques and use the electromagnetic wave of the channel as a carrier for transmission.
  • Popular understanding: The electromagnetic wave is like a worker. This electromagnetic wave can run forward carrying the bit stream, so the transmission rate of the bit stream on the channel is the rate of electromagnetic wave propagation in the upload.

Official :传播时延 = 信道长度 / 电磁波在信道上的传输速率

Example : As shown in the figure below, the period of time that our data waits until it is transmitted on the channel and reaches the router is the propagation delay.

test

Compare the sending delay : The sending delay generally occurs inside the host, in the network adapter, that is, in the transmitter inside the machine; the propagation delay occurs outside the machine, on this channel.


③ Queuing delay

排队时延: The waiting time required to wait for the output or input link to be available.

Example : The information transmitted by our host arrives at the router, but the time it spends outside before being processed can be called the queuing delay.

image-20230723165753917


④Processing delay

处理时延: If the data queuing is completed, some forwarding work can be performed at this time. This forwarding process also takes time, mainly including error detection and finding the exit.

An example of queuing delay and processing delay : Take the airport security check as an example. We are already in the queue after the security check. At this time, there are many people in front of us, and we need to wait at this time. This time is [while queuing] Delay]; Finally, after a long time, we were queued up. At this time, we went to the security checkpoint. The process of detection and processing on the security checkpoint was [processing delay].

Is there any relationship between sending rate and propagation delay?

If we increase the sending rate to 100bit/s (original 10bit/s), the sending rate or channel bandwidth will be increased. While the data length remains unchanged, the sending delay will definitely become smaller.

  • Derivatives: The increase in the transmission rate in high-speed links will only affect the channel bandwidth, increase the transmission rate, and reduce the transmission delay, but will not affect the transmission rate and propagation delay of electromagnetic waves.

image-20230723170957742


1.4.5. Delay-bandwidth product

时延带宽积: The product of delay and bandwidth. A performance attribute used to describe the amount of data or information.

  • The delay here refers to the propagation delay, which is the maximum data volume rate that the sender can achieve when sending data. It refers to the time it takes for electromagnetic waves to transmit on the channel. The unit is s.
  • Bandwidth: It is b/s.

Official : 时延带宽积 = 传播时延 x 带宽.

  • The propagation delay is in seconds, and the bandwidth is in b/s (a few bits per second), so the unit of the delay-bandwidth product is bit.

A more vivid understanding of the delay-bandwidth product : it is all data capacity starting from the link - link borrowing.

image-20230723171648588

时延带宽积Also known as the link length in bits , it is simply " how many bits a certain link currently has ", which refers to the data capacity performance index of the link at this moment.


1.4.6. Round trip time RTT

Generally, this RTT will appear when playing games. If the number is relatively large, then the game will be very laggy. If the number is small, the game will be very smooth.

RTT definition : refers to the total delay experienced from the time the sender sends data to the time the sender receives the confirmation from the receiver (the receiver sends confirmation immediately after receiving the data).

  • The larger the RTT, the more data can be sent before an acknowledgment is received.

RTT composition : ① Round trip propagation delay = propagation delay * 2. ②Terminal processing time.

  • The propagation delay refers to the time of transmission on the channel, which is related to the electromagnetic wave rate and the channel length. The round trip is twice the propagation delay.
  • The terminal processing time refers to the processing time from when the receiver may process this data to sending an acknowledgment frame. [General topics will directly calculate twice the propagation delay, and the terminal processing time will be directly ignored]

Note : RTT does not include transmission delay (referring to the time it takes to put all data from the host to the channel), but only the time it takes to transmit data on the channel.

Practical example : When pinging Baidu's domain name on a MAC computer, there will be a corresponding RTT round-trip delay time.

image-20230725154917474


1.4.7. Utilization rate

Utilization definition : The efficiency of utilization mainly depends on how much time is used for data on this link. If there is always data being transmitted on the link, then it means that the utilization rate of the link is verified. If there is no data transmission, Then the utilization rate is relatively low, which is 0.

Utilization classification : channel utilization, network utilization.

  • Channel utilization formula: 有数据通过时间 / (有+无)数据通过时间.
  • Network utilization formula: 信道利用率加权平均值.

Related performance indicators : If the delay is larger , it means that a lot of data is transmitted on the channel at this time, the utilization rate will be infinitely close to 1 , and the corresponding rate will actually decrease .

Example :

Scenario 1: On the same long channel, only a few data are traveling together, which means that the utilization rate is relatively low.

image-20230725155655199

Scenario 2: On the same long channel, a large amount of data is being transmitted. If there is more data, the utilization rate will be higher.

image-20230725155738962


mind map moment

image-20230725160118866


2. Computer network architecture and reference model

2.1. Hierarchical structure, protocols, interfaces, services

2.1.1. Introducing layering. Why layering?

image-20230725180414335

What needs to be done between sending a file :

  1. The computer initiating the communication must activate the data communication path.
  2. To tell the network how to identify the destination host.
  3. The computer initiating the communication needs to find out whether the destination host is powered on and connected to the network normally.
  4. The computer initiating the communication needs to find out whether the file management program in the other party's computer is ready.
  5. Make sure mistakes and surprises can be resolved.
  6. …and a range of other jobs

It can be seen that just sending a file involves a series of big problems. So many problems cannot be solved directly in a series. At this time, they can be broken down into small problems to achieve.

Solution : Hierarchy.


2.1.2. How to perform stratification? (Practical examples and understanding of nouns)

Examples of express delivery in real life :

image-20230725181015388

Understand multiple terms : entities, peer entities, protocols, interfaces, services.

  • 实体: The item to be sent, that is, the data that the other party actually wants to receive.
  • 对等实体: Two objects that are very similar to each other are collectively called equivalent entities.
  • 协议: Fixed how each layer should be packaged and unpacked. Only peer entities have agreements.
    • Take a case that does not comply with the agreement: for example, soft packaging and unpacking wooden boxes are not equivalent entities in themselves, so there is no agreement between the two unequal entities.
  • 接口: Logical interface, standard definition.
  • 服务: What is provided between each two layers is called a service. The upper level uses the services of the lower level, and the lower level must provide services to the upper level.

image-20230725181702037

Basic principles of layering :

1. Each layer is independent of each other, and each layer only implements a relatively independent function.

2. The interface between each layer is natural and clear, easy to understand, and there is as little communication as possible.

3. The structure can be divided, and each layer is realized using the most appropriate technology.

4. Maintain the independence of the lower layer from the upper layer, and the upper layer uses the services provided by the lower layer in one direction .

5. The entire layered structure should promote standardization efforts.


2.1.3. Formal understanding of the hierarchical structure (the true meaning of nouns, the three major elements of the agreement)

image-20230725183937374

Let’s formally re-understand the representation of multiple nouns in the above picture :

1. 实体: The active elements in the nth layer are called n-entities. Entities at the same level are called peer entities.

2.: 协议The rules, standards or conventions established for data exchange between peer entities in the network are called network protocols. 【level】

  • For example, Layer 4 protocols cannot be equivalent to Layer 3 protocols.

The three major elements of the protocol : syntax, semantics, and synchronization.

  • 语法: Specifies the format of transmitted data.
  • 语义: Specifies the functions to be completed.
  • 同步: Specifies the order of various operations.

The following example uses a binary number to illustrate the meaning of each element: 001000100111001

  • Grammar example: Elaborate or start dividing according to the numerical form of 0 or 1.
  • Semantic example: Previously, the grammar said that it would be divided into segments, so the meaning of each segment must also be specified and standardized, and what functions it can achieve.
  • Synchronization example: stipulating the order of various operations, such as stipulating which part of data is sent first and which part of the data is sent last. This is the stipulation of the sequence.

3. 接口(Access service point SAP): The entrance for the upper layer to use the lower layer services.

There will be an interface between adjacent ones. This interface serves as a bridge. This connection requires the use of services.

4. 服务: The lower layer calls functions provided by the adjacent upper layer. 【vertical】

  • The service is one-way, the upper layer uses it, and the lower layer provides the service.

Explanation of vertical and horizontal : vertical is a noun between the upper and lower layers, the vertical direction; protocol is a noun between the same level and peer levels, the horizontal direction.


2.1.4. Data relationship between layers (SDU, PCI, PDU)

Extract the fifth layer, the fourth layer, and the third layer respectively to see what kind of data inclusion relationship exists between the corresponding three layers: SDU, PCI, and PDU.

image-20230725184036816

SDU服务数据单元(Service Data Unit): Data that should be transmitted to complete the functions required by the user.

  • To put it simply: it is the data to be transmitted at each layer, the useful part.

PCI协议控制信息(Protocol Control Information): Control protocol operation information.

  • Brief description: refers to the information that controls protocol operations, which can be simply understood as some control information.

PDU协议数据单元(Protocol Data Unit): SDU plus PCI control protocol, the actual data unit transmitted between peer layers.

Describe the data relationship between each layer : the PDU of each layer will be used as the SDU of the next layer, and the PCI protocol information of the corresponding layer can be added to form a PDU again.


Concept summary

1. Network architecture describes the structure of a computer network from a functional perspective.

2. Computer network architecture, referred to as network architecture, is a layered structure .

3. Each layer follows a certain/some network protocols to complete the functions of this layer.

4. Computer network architecture is a collection of layers of computer networks and their protocols.

5. When the nth layer provides services to the n+1 layer, this service not only includes the functions of the nth layer itself, but also includes the functions provided by the lower layer services.

6. There are only interfaces between neighbors , and the specific implementation details of the provided services are completely shielded from the upper layer.

7. The architecture is abstract , and the implementation refers to some software and hardware that can run.


mind map moment

image-20230725184609869


2.2. OSI reference model

2.2.1. Understand computer layering standards

There are many standards for computer layered architecture : 7-layer OSI reference model, 4-layer TCP/IP reference model.

7层OSI参考模型: Legal standard.

  • Statutory standards refer to computer network reference model standards that are issued and prescribed.

4层TCP/IP参考模型: De facto standard.

  • The de facto standard refers to a reference model that is currently used in real life and has good user experience.

By summarizing the advantages and disadvantages, a new five-layer architecture was obtained, mainly for the purpose of making learning more convenient and thinking clearer.


2.2.2. Understand the ISO/OSI reference model and how it came about?

In order to solve the complex and large problems of computer networks, a hierarchical structure is implemented according to functions .

Why does the ISO/OSI reference model appear?

Reason: Many companies have proposed their own network architecture. The architecture of the corresponding company corresponds to the company's products. Different companies can only use their architecture if they use their products. At this time, if you want everyone to conduct an online interconnection is very difficult.

  • For example, IBM, which was the first to propose a network architecture, developed the SNA model, DEC developed the DNA model, and the U.S. Department of Defense developed the TCP/IP protocol.

image-20230725191321095

The International Standards Organization ISO proposed the Open System Interconnection OSI Reference Model in 1984 .

  • The openness here is non-monopoly. This openness is universal. Different networks, different devices, software, and hardware can all be connected on the network.

The purpose of the OSI reference model is to support the interconnection of heterogeneous networks.

Has the OSI reference model been implemented?

  • The theory was successful, but the market failed!

Main reasons for failure :

1. OSI experts lack practical experience and have very good ideas.

2. The OSI protocol is complex to implement and its operating efficiency is very low.

3. The development cycle of OSI standards is too long. When the OSI model came out, there was actually a very good TCP/IP in use on the market.

4. The OSI layer division is unreasonable. Some functions will appear repeatedly in multiple layers. There are some disadvantages that are not suitable for our market needs. TCP/IP is very in line with market demand, and OSI can only become a piece of history and a legal standard.


2.2.3. Understand the seven layers of the ISO/OSI reference model

OSI consists of seven layers : physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer.

  • Tips: Remember one word for each layer. The IoT Chain Network will show its use [Internet of Things Shuhui Trial].

The upper three layers belong to the resource subnet , which is mainly used for data processing, and the lower three layers are the communication subnet, which is mainly used for data transmission.

image-20230725191555538


2.2.4. ISO/OSI reference model explains the communication process

2.2.4.1. Simple understanding of the data transmission process

The process of transmitting a data is steps 1-6 in the figure below:

  • ① First, host A will go through 7 layers, and each layer will add corresponding control information. Only the physical layer is only converted into binary for transmission;
  • ②Transmit bit stream data through the transmission medium.
  • ③After passing through some intermediate systems (such as routers and switches) [multiple may be encountered during the entire transmission process], there are only three layers for the intermediate system, and the bit stream will be restored from the physical layer - the data link layer - the network layer. to the data link layer and then back to the network layer. Then it is wrapped layer by layer to the physical layer and sent out again.
  • ④Encapsulate the data packet in the intermediate system, and finally convert it into a bit stream at the physical layer and continue to transmit it to the target host.
  • ⑤Transmit bit stream data through the transmission medium.
  • ⑥The target host also has seven layers, which are continuously disassembled starting from the physical layer.

image-20230725202149020

  • Both end systems need to go through seven layers, and intermediate systems such as routers only need to go through three layers (physical layer, data link layer, network layer).

Note : The physical layer does not add some ancillary control information, and converts data into binary 0 and 1 forms in the physical layer.


2.2.4.2. Understand whether each layer belongs to end-to-end or point-to-point?

The main purpose is to see what operations have been performed on the data before, such as where to send it next .

image-20230725202243310

  • For the upper four layers, since the intermediate system is not involved, the upper four layers of host A and host B are actually end-to-end.
  • For the lower three layers, since the intermediate system also involves these three layers, and the intermediate systems passing through may be multiple routers or other forwarding devices, the lower three layers are called point-to-point. (Every time I just care about where to go next)

2.2.4.3. The process of adding and removing data and protocols between each layer (data encapsulation process)

How does each level operate on data ?

As shown in the figure below, host A starts from 7-1 and then converts the physical layer into a bit stream and then transmits the data to host B, and then disassembles it from 1-7 in sequence :

image-20230725201848382

Here, host A is used to describe the packaging process : first at the application layer, the data will add PCI control information, then the 7 in the corresponding H7 represents the header of the seventh layer. At this time, DATA and H7 form a 7-PDU. Then enter the presentation layer, and also add the header H6 of the sixth presentation layer. This is true for numbers 5, 4, and 3 below.

  • Then the actual actions performed by each layer in the unpacking process are corresponding. One is to add control information. In the unpacking process, the control information is disassembled, and then continued in sequence until the final DATA data is obtained.

Additional points of note :

  1. During the packaging process, not only a header is added to layer 2, but also a tail information field is added.
  2. During the packaging process, no control information will be added to the first layer, only the PDU of the second layer will be converted into a binary bit stream and sent out!

2.2.5. Introduction to the seven-layer functions of the ISO/OSI reference model

①Application layer

应用层: All programs that can interact with users and generate network traffic will involve the application layer. Notepad, for example, is just for text editing and does not involve generating network traffic.

Typical application layer services : file transfer (FTP), email (SMTP), World Wide Web (HTTP).

image-20230725204458861


②Presentation layer

image-20230725210147584

表示层: A layer immediately adjacent to the application layer that handles the representation of information exchanged between two communication systems.

  • To put it simply: Mainly responsible for something that is finally displayed on our device or screen. Usually it is a treatment of syntax and semantics.
  • Two communication systems refer to: any two devices, mobile phones.

Presentation layer protocols : JPEG, ASCII.

  • In fact, in the TCP/IP five-layer structure, the actual presentation layer will be incorporated into the application layer session layer. The presentation layer does not have any separate protocols. If it must be said, then it is the above ones, which are used to represent the encoding of image display and so on. .

The following are the various functions of the presentation layer :

Function 1: Data format conversion

Reasons for data format conversion: Different hosts have different encoding and representation methods. In order to enable different hosts to exchange data or information, this presentation layer is needed, which implements the function of data format conversion.

Practical example 1: For example, if Chinese and Thai people are chatting, then if they only understand their native language, a translator will be needed to translate. The presentation layer plays the role of translation.

Practical example 2: The bit stream transmitted on the data link will eventually be converted into a jpg image on the screen, which can be opened for preview.

image-20230725205109321

Function 2: Data encryption and decryption

Encryption and decryption original: If we send a string of passwords to the other party's host, and if we directly convert the password to binary transmission, then the plaintext transmission may be stolen from the link by others. At this time, we can verify the password to be transmitted at the sending end. The data is encrypted and then decrypted by the receiving end.

Actual case: I sent the subject a string of passwords. The actual intermediate process was encrypted, but the subject's mobile phone displayed it in clear text.

image-20230725205351929

Function Three: Data Compression and Recovery

image-20230725210159236

Actual case: Video chat images are compressed when sent and decompressed when received by the other party, reducing the amount of data transmitted.


③Session layer

image-20230725230510884

会话层: Provides presentation layer entities/user processes with establishing connections and orderly transmitting data on the connections.

  • Only when a connection is established can data be transferred.

Responsible function : This is the session and also the establishment of synchronization (SYN).

Main protocols : ADSP, ASP.

For example : For example, if two windows are opened on the browser, one is Baidu and the other is Movies, then when the corresponding URL is opened at this time, the connection has actually been established, and then our operations on any one web page will not affect the other ones. window page.

image-20230725210934269

Included functions are as follows :

Function 1: Establish, manage and terminate sessions

For example: opening a web page in a browser is equivalent to establishing a session, and closing a web page is equivalent to terminating a session.

Function 2: Using checkpoints allows the session to resume communication from the checkpoint/synchronization point when communication fails, thereby achieving data synchronization.

For example: For example, when transmitting a very large file, the data stream will actually be split into multiple parts, and a check point or synchronization point will be inserted into each part. Once it terminates abnormally, or the communication fails, Then the session will be terminated at this time. With this synchronization/checkpoint, we will wait for reconnection and retransmit directly from the interrupted position.

  • If there is no such synchronization/checkpoint, then retransmission will be possible from the very beginning.

④Transport layer

image-20230725230525245

传输层: Responsible for the communication between two processes in the host, that is, end-to-end communication.

  • The upper four layers are end-to-end communication, and the lower three layers are point-to-point, because the transmission process may pass through multiple intermediate systems (routers, switches, etc.), and there are only the lowest three layers for the intermediate systems. So the lower three floors are point-to-point.
  • End-to-end communication refers to communication between two processes running on different hosts. Each process uses a number to identify it, that is, a port number.

Transmission unit : message segment or user datagram.

Main protocols : TCP, UDP.

It contains four functions as follows:

Function 1: Reliable transmission, unreliable transmission

image-20230725231631695

  • Reliable transmission is based on the process of the confirmation mechanism: when sending a large file, it will actually be cut into multiple messages and then placed on the link one by one for transmission. After being transmitted to the receiving end, for each received message, the receiving end A confirmation will be returned to tell you that I have received it, and then the sending end can continue to send after receiving this confirmation message. If a message sent by a sender does not receive a confirmation message, the sender will send it again until the confirmation message is received before continuing to send new messages.
  • Unreliable transmission method: For some very small data, we actually do not need to use reliable transmission method. We do not need to establish a connection first and then send it, because establishing the connection first will be very time-consuming. We directly send a data packet.

Function 2: Error control

Explanation: Control any errors that occur. If some of the message segments we transmit are lost or in the wrong order, the transport layer will correct these errors to correct the errors.

Function three: flow control

Explanation: Control the speed at which the sender sends data. If the receiver is too late to receive or the link is congested for some reason, the receiver will notify the sender and then the sender will slow down its sending rate, so this is called flow control.

Function 4: Reuse and separate

  • Reuse: Multiple application layer processes can use the services of the underlying transport layer at the same time.
  • Decentralization: The transport layer delivers the received information to the corresponding processes in the application layer above.

Take an example to understand reuse and separation: There are two applications in mobile phone A. One is QQ occupying process 1, and the other is WeChat occupying process 2 (the QQ and WeChat processes of mobile phone B also have the same port). At this time, both QQ and WeChat are using the same port. Send a message to mobile phone B. [Multiplexing] At this time, the two messages sent will be in the form of message segments. The QQ message will have a process number, and the WeChat message will be placed on the transport layer for the next step. transmission. [Splitting] The receiving end will actually disassemble the sent message and then copy it to the user area of ​​the specified process according to the corresponding process number.

image-20230725235547385

Remember four functions: you can check and use it (you can also keep it if it is bad).


⑤Network layer

网络层: The main task is to transmit packets from the source to the destination and provide communication services for different hosts on the packet switching network.

Network layer transmission unit : datagram.

Understand the relationship between datagrams and packets : When the datagram is too long, the datagram can be cut into small packets one after another, and then placed on the link for transmission. This allows us to be more flexible during transmission and consume less.

Main protocols : IP, IPX, ICMP, IGMP, RARP, OSPF.

Four major functions:

Function 1: Routing selection.

image-20230726000232856

Purpose: Select the appropriate route. At this time, if there is a sender that wants to send a piece of data, there may be multiple directions that can be taken at this time. The best path , which is the most appropriate route , can be calculated and selected based on the network conditions at the time and the corresponding routing algorithm. way, so that the packet reaches the receiving end correctly or smoothly from the sending end.

Function two: flow control.

Purpose: Used to coordinate a speed issue between the sender and the receiver. If the sender sends too fast and the receiver has no time to receive, the sender can be notified, so that the sending speed can be controlled.

Function 3: Error control.

Purpose: Some specific rules are agreed between two communication nodes, such as parity check codes, etc. The receiver will check whether there are errors in the received packets based on these rules. If there are errors, they will be corrected. At this time, the packet can be thrown away. By doing so, you can ensure that the data submitted by the transport layer above is correct.

Function 4: Congestion control.

Purpose: Compared with flow control, which mainly limits the speed of the sender, congestion control is aimed at the overall situation and controls the overall speed from a macro perspective.

  • If all nodes have no time to accept packets and have to discard a large number of packets, the network will be in a congested state, so certain measures must be taken to alleviate this congestion.

⑥Data link layer

image-20230726001921896

数据链路层: Assemble the datagrams transmitted from the network layer .

Data link layer/link layer transmission unit : .

Main protocols : SDLC, HDLC, PPP, STP.

Features included are as follows :

Function 1: Framing (define the start and end of the frame)

For example:…100000010110010101

After the data packets are assembled into frames, a relatively long bit stream sequence will be formed. For such a bit stream sequence, we need to define where the frame begins and ends. Define several combinations of the start of the frame and the end of the frame 0 and 1. After being defined in this way, the receiving end will extract part of the frame data when receiving a frame, and then hand it over to the network layer for the next step of decapsulation.

Function 2: Error control (frame error + bit error)

For these two errors, the data link layer will have corresponding error detection or correction methods. If an error is found, the erroneous frame will simply be discarded to avoid continuing to transmit and waste resources. If it is necessary to correct the data correction You can use some reliable transmission protocols to correct errors.

Here error control can detect and correct errors.

Function three: flow control

Purpose: Coordination issues between sender and receiver. If the receiver's cache is not enough, the data sent at this time will be discarded. At this time, the sender will be told to send slowly and wait until there is buffer space before sending again, and then speed up.

Function 4: Access (access) control

Core: Controls access to the channel.

Purpose: There are four hosts at this time, which are connected using this bus type. If it is in a broadcast network, the data content layer must deal with this access control problem and specify which host to control. It can now be occupied. A channel, because only one person can send a message at the same time in a broadcast network, and everyone else is in the listening state, so the data content layer can control access to such a shared channel by a special sublayer, which is the media access sublayer . to deal specifically with the issue of control.

image-20230726001858159


⑦Physical layer

image-20230726001934316

物理层: The main task is to achieve transparent transmission of bit streams on physical media.

  • Physical media include: coaxial cables, twisted pairs, and radio waves.

The physical layer transmission unit is : 比特.

Main physical layer protocols : RJ45, 802.3.

Transparent transmission : refers to any combination of transmitted data, which should be able to be transmitted on the link. (I will send whatever you give me), if a series of bit streams are received, then the physical layer simply converts them into the form of electrical signals , and then spreads them on the link.

image-20230726002227261

Functions include:

Function 1: Define interface characteristics.

For example, determining how many pins a plug connecting a cable should have, or how each pin should be connected, is part of the interface characteristics.

Function 2: Define transmission mode

Three types: simplex, half-duplex, and duplex.

  • Simplex: Only one direction can be used, and only one person can talk at the same time.
  • Half-duplex: Two people can be receivers or senders, but only one person can talk at the same time.
  • Duplex: Both people at the sender end can be receivers or senders, and both people can talk at the same time.

Function 3: Define transmission rate.

For example, 10 Mbit/s and 100 Mbit/s are defined by the physical layer.

Function 4: Bit synchronization.

Synchronization means that the sender sends a 1 and the receiver can receive a 1. To ensure bit synchronization, a moderate speed is required.

Function 5: Bit encoding.

For example, Manchester encoding, etc., mainly stipulates 0 and 1, what kind of voltage represents 1, and what kind of voltage represents 0.


mind map moment

image-20230726002845631


2.3. TCP/IP reference model and five-layer reference model

2.3.1. Compare OSI and TCP/IP models

OSI is a legal standard; TCP/IP is a practical standard.

image-20230726133647287

The first is the protocol stack born from TCP/IP, and then it is layered based on this protocol to create such a reference model layer by layer .

  • OSI is theory first, but there is no practice; TCP/IP is theory first, practice first, and then there is a reference model.

image-20230726133630433

  • Network interface layer: It is just said to be equivalent to an interface, and some of the details are not specified.
  • Internet layer: The function is similar to OSI. It splits the datagram into packets and sends them to any network, and performs a routing selection.
  • Transport layer: implements end-to-end or process-to-process communication.
  • Application layer: combines the presentation, session, and application layers, and integrates the protocols used in the three layers.

The origin of the name of the TCP/IP protocol : first of all, it is a stack structure, layer after layer, which is the reference model of the protocol stack that appeared first and came later. And from top to bottom, TCP protocol and IP protocol are two very commonly used protocols, so they are named TCP/IP protocol. Of course, this protocol stack includes more than these two protocols.


2.3.2. Similarities and differences between the OSI reference model and the TCP/IP reference model

The OSI reference model has the same points as the TCP/IP reference model:

1. Layering is adopted.

2. Based on the concept of independent protocol stack.

3. Heterogeneous network interconnection can be realized.

The differences between the OSI reference model and the TCP/IP reference model :

1. OSI defines three points: service, protocol and interface

2. OSI has a reference model first, then a protocol, and is not biased towards a specific protocol; while TCP/IP has a protocol first and then designs a reference model.

3. From the beginning of TCP/IP design, heterogeneous network interconnection issues were taken into consideration, and IP was regarded as an important layer.

4. The difference between the OSI reference model and the TCP/IP model in the network layer and transport layer

image-20230726134218827

  • The transport layer should exist to achieve reliable transmission, so both reference models are connection-oriented.
  • 面向连接: ① Establish a connection and issue a request to establish a connection at the current stage. ② Data transmission can only begin after the connection is successfully established. ③When the data transmission is completed, the connection must be released.
  • For connectionless: there is no connection establishment or closing phase, and data transmission is performed directly.

2.3.3. Five-layer reference model

5-layer reference model : combines the advantages of OSI and TCP/IP

image-20230726135140157

应用层: Support various network applications.

  • Protocols: FTP, SMTP, HTTP.

传输层: Process-Process data transfer.

  • Protocol: TCP, UDP.

网络层: Data packet routing and forwarding from source host to destination host.

  • Protocols: IP, ICMP, OSPF.

数据链路层: Assemble the datagrams transmitted from the network layer into frames.

  • Protocol: Ethernet, PPP.

物理层: Bit transmission.

  • Protocol: RJ45, 802.3.

2.3.4. Data encapsulation and decapsulation of 5-layer reference model

Example : Host A sends a message to Host B.

image-20230726135700827

Host A's sending process : ① First, the data enters the application layer, and the corresponding PCI protocol is added to form a message. ②When entering the transport layer, the message will be cut into segments and the control information of the transport layer will be added again. ③Entering the network layer will encapsulate the message segment into a datagram. ④ Entering the data link layer requires framing. ⑤ Directly convert the frame into a bit stream and send it out.

Host B reception process : First, the physical layer receives the bit stream, and then restores it at each layer in turn, and finally obtains the data sent by Host A.


mind map moment

image-20230726140449375


Chapter 1 Knowledge Summary

image-20230726143444996


Organized by: Long Road Time: 2023.7.22-26

Guess you like

Origin blog.csdn.net/cl939974883/article/details/131940415