提交译文

This commit is contained in:
cool-summer-021 2022-12-12 21:36:09 +08:00 committed by GitHub
parent ee5dc1c18b
commit 64c825dd5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 100 additions and 100 deletions

View File

@ -1,100 +0,0 @@
[#]: subject: "Learn the OSI model in 5 minutes"
[#]: via: "https://opensource.com/article/22/10/osi-model-network-communications"
[#]: author: "Anamika https://opensource.com/users/anamika"
[#]: collector: "lkxed"
[#]: translator: "cool-summer-021"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Learn the OSI model in 5 minutes
======
Get the basics of the Open Systems Interconnection (OSI) framework for conceptualizing communication within a computer system.
The Open Systems Interconnection (OSI) model is a standard for how computers, servers, and people communicate within a system. It was the first standard model for network communications and was adopted in the early 1980s by all major computer and telecommunications companies.
The OSI model provides a universal language for describing networks and thinking about them in discrete chunks, or layers.
### Layers of the OSI model
The model describes the seven layers through which computer systems communicate over a network.
1. [Application layer][2]
2. [Presentation layer][3]
3. [Session layer][4]
4. [Transport layer][5]
5. [Network layer][6]
6. [Data link layer][7]
7. [Physical layer][8]
Each of these layers has its own way of working, with its own set of protocols that distinguish it from the others. This article provides a breakdown of the layers one by one.
### Application layer
The application layer is implemented in software. It is the layer used to interact with applications.
Consider the example of sending a message. The sender will interact with the application layer and send the message. The application layer sends the message to the next layer in the OSI Model, the presentation layer.
### Presentation layer
The data from the application layer is forwarded to the presentation layer. The presentation layer receives the data in the form of words, characters, letters, numbers, and so on, and converts them into machine representable binary format. This process is known as translation.
At this stage, ASCII characters (American Standard Code for Information Interchange) are converted into Extended Binary Coded Decimal Interchange Code (EBCDIC). Before the converted data goes further, it also undergoes encoding and encryption processes, using the SSL protocol for encryption and decryption.
The presentation layer provides abstraction and assumes that the layers following it will take care of the data forwarded to them from this layer. It also plays a role in compression of the data. The compression can be lossy or lossless, depending on various factors beyond this article's scope.
### Session layer
The session layer helps in setting up and managing connections. The main work of this layer is to establish a session. For example, on an online shopping site, a session is created between your computer and the site's server.
The session layer enables the sending and receiving of data, followed by the termination of connected sessions. Authentication is done before a session is established, followed by authorization. Like the previous layers, the session layer also assumes that, after its work is done, the data will be correctly handled by the subsequent layers.
### Transport layer
The transport layer manages data transportation and its own set of protocols for how data will be transferred. The data received here from the session layer is divided into smaller data units called segments. This process is known as segmentation. Every segment contains the source's and destination's port numbers and a sequence number. Port numbers identify the application on which the data needs to be sent. Note that the data is transferred in chunks. The sequence numbers are used to reassemble the segments in the correct order.
The transport layer takes care of the flow control, or the amount of data transferred at a given time. It also accounts for error control, such as data loss, data corruption, and so on. It makes use of an error-detecting value known as a checksum. The transport layer adds a checksum to every data segment to check whether the sent data is received correctly. Data is then transferred to the network layer.
### Network layer
The network layer helps communicate with other networks. It works to transmit received data segments from one computer to another located in a different network. The router lives in the network layer.
The function of the network layer is logical addressing (IP Addressing). It assigns the sender's and receiver's IP addresses to each data packet to ensure it is received at the correct destination. The network layer then routes the data packets. Load balancing also happens in the network layer to make sure that no overloading takes place. Next, the data is transported to the data link layer.
### Data link layer
The data link layer allows direct communication with other devices, such as computers and hosts.
It receives data packets containing the IP addresses of the sender and receiver from the network layer and does the physical addressing, assigning the media access control (MAC) addresses of the sender and receiver to a data packet to form a frame.
### Physical layer
This layer consists of all the hardware and mechanical elements of a system, including the configuration of wires, pins, adapters, and so forth. The data received here by the preceding layers is in the form of 0s and 1s. The physical layer converts this data and transports it to local media via various means, including wires, electrical signals, light signals (as in optical fiber cables), and radio signals (as in WiFi).
Note that the physical layer works at the receiver's end and transports the received signal to the data link as a frame (by converting it back to bits). The frame is moved to the higher layers, and ultimately the required data is received at the application layer, which is the software.
### Conclusion
The OSI model is helpful when you need to describe network architecture or troubleshoot network problems. I hope this article gave you a clearer understanding of the elements this model.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/osi-model-network-communications
作者:[Anamika][a]
选题:[lkxed][b]
译者:[cool-summer-021](https://github.com/cool-summer-021)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/anamika
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/code_computer_development_programming.png
[2]: https://opensource.com/article/22/10/osi-model-network-communications#application-layer
[3]: https://opensource.com/article/22/10/osi-model-network-communications#presentation-layer
[4]: https://opensource.com/article/22/10/osi-model-network-communications#session-layer
[5]: https://opensource.com/article/22/10/osi-model-network-communications#transport-layer
[6]: https://opensource.com/article/22/10/osi-model-network-communications#network-layer
[7]: https://opensource.com/article/22/10/osi-model-network-communications#data-link-layer
[8]: https://opensource.com/article/22/10/osi-model-network-communications#physical-layer

View File

@ -0,0 +1,100 @@
[#]: subject: "Learn the OSI model in 5 minutes"
[#]: via: "https://opensource.com/article/22/10/osi-model-network-communications"
[#]: author: "Anamika https://opensource.com/users/anamika"
[#]: collector: "lkxed"
[#]: translator: "cool-summer-021"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 分钟内了解 OSI 模型
======
理解OSI框架的基本概念掌握计算机系统通信机制
开放系统互联OSI模型是一个定义计算机、服务器和用户如何在一个系统内通信的标准。它是第一个网络通信标准模型在20世纪80年代早期所有主流的计算机和通信公司都采用了这个标准。
OSI 模型提供了一种通用语言,用于描述网络,以及在离散的块或层中考虑相关的问题。
### OSI模型的各个层
该模型描述了计算机系统通过网络进行通信的七个层。
1. [应用层][2]
2. [表现层][3]
3. [会话层][4]
4. [传输层][5]
5. [网络层][6]
6. [数据链路层][7]
7. [物理层][8]
每个层都有自己的工作方式和一系列跟其他层不同的协议。本文将逐个剖析这些层级。
### 应用层
应用层是在软件中实现的。它是与应用程序交互的层级。
考虑发送消息的例子。发送消息的程序与应用层进行交互,并发送消息。接着,应用层向 OSI 模型的下一个层级(即表现层)发送消息。
### 表现层
来自应用层的数据被转发到表现层。表现层接收到文字、字符、字母、数字等形式的数据,并把它们转换为机器可识读的二进制格式数据。这个过程叫做编译。
在此阶段ASCII美国信息交换标准码 字符被转换为扩充的二进制编码的十进制交换码EBCDIC。转换后的数据在继续传输前也会进行编码和加密过程使用SSL协议进行加密和解密。
表现层的作用是抽象化,它假设下面的层级会处理它们收到的数据。它也负责压缩数据。数据的压缩可能是有损的,也有可能是无损的,这取决于很多因素,不属于本文的讨论范围。
### 会话层
会话层的作用是建立和管理连接。该层级的主要工作是建立会话。例如,你登录网上商城,就在你的机器和服务器之间建立了会话。
会话层的作用是实现数据的发送和接收,完成后连接的会话就终止了。在一个会话建立前,会进行身份验证。与上一层类似,会话层也假设在它的工作完成后,下面的层级也会准确无误地处理数据。
### 传输层
传输层的作用是管理数据传输和其自身的关于数据如何传输的一些协议。从会话层传到这里的数据被分为更小的数据单元,这些数据单元称为片段。这个过程叫做“分割”。每个片段包含来源端口号、目标端口号和一个序列号。端口号用来识别发送数据的应用程序。注意,数据以块的形式传输。序列号用于把这些片段按正确的顺序排列。
传输层负责控制流量或在给定的时间内传输的数据量。它也负责错误的管理,比如数据丢失、损坏等情况。它利用一种错误探测值,通常叫做校验和。传输层对每个数据片段加上校验和,就可以检查所发送的数据是否被正确接收。然后数据传输到网络层。
### 网络层
网络层的作用是跟其他网络进行通信。它把从一台机器接收到的数据片段传输给另一台位于不同网络的机器。路由器是作用于网络层的。
网络层的功能是逻辑寻址(就是确定 IP 地址)。它为发送方和接收方分配 IP 地址,数据包附带了这个地址,就可以被传输到正确的目标机器。接着网络层对数据包进行路由。负载均衡也是在网络层进行的,旨在确保不会发生过载。下一步,数据传输到数据链路层。
### 数据链路层
数据链路层支持跟其他设备直接通信。
它接收到来自网络层、包含发送方和接收方 IP 地址的数据包,进行物理寻址,然后将发送方和接收方的 MAC 地址分配给数据包,形成帧。
### 物理层
物理层由系统的所有硬件和物理设备(包括网线、导航系统、适配器等)组成。在这里,从前面层级接收到的数据都是 0 和 1 形式的。物理层把这些数据转换并通过各种方式(如果是光纤电缆,有电线、电信号、光信号;如果是 WIFI则为无线电信号传输至本地媒介。
注意,物理层作用于接收方的一端,把接收到的信号以帧的形式传输到数据链路层(把它转换回二进制数据形式)。然后帧传输到上面的层级,最终应用层(应用软件)会接收到需要的数据。
### 结语
当你需要描述网络架构或排除网络问题时OSI 模型的相关知识会对你有所帮助。我希望本文能令你对这个模型的方方面面有清晰的理解。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/osi-model-network-communications
作者:[Anamika][a]
选题:[lkxed][b]
译者:[cool-summer-021](https://github.com/cool-summer-021)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/anamika
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/code_computer_development_programming.png
[2]: https://opensource.com/article/22/10/osi-model-network-communications#application-layer
[3]: https://opensource.com/article/22/10/osi-model-network-communications#presentation-layer
[4]: https://opensource.com/article/22/10/osi-model-network-communications#session-layer
[5]: https://opensource.com/article/22/10/osi-model-network-communications#transport-layer
[6]: https://opensource.com/article/22/10/osi-model-network-communications#network-layer
[7]: https://opensource.com/article/22/10/osi-model-network-communications#data-link-layer
[8]: https://opensource.com/article/22/10/osi-model-network-communications#physical-layer