电信计算机网络测试题_HTTP简介:探索计算机系统中的电信

电信计算机网络测试题

by Cher Don

由谢尔·唐(Cher Don)

HTTP简介:探索计算机系统中的电信 (An introduction to HTTP: Exploring Telecommunication in Computer Systems)

了解开放系统互连模型 (Get to know the Open Systems Interconnection model)

总览 (Overview)

Throughout this series, we will be tackling the basics such as: (Part 1) How does DNS work? (Part 2) Network Stack, OSI Model [You are here!](Part 3) HTTP Methods and Formats (Part 4) Client Identification (Part 5) Basic/Digest Authentication (Part 6) HTTPS working with SSL/TLS

在整个系列中,我们将处理诸如以下的基础知识:( 第1部分)DNS如何工作? (第2部分)网络堆栈,OSI模型[您在这里!] (第3部分)HTTP方法和格式(第4部分)客户端标识(第5部分)基本/摘要身份验证(第6部分)使用SSL / TLS的HTTPS

OSI模型 (OSI Model)

The Open Systems Interconnection (OSI) Model is a standardized model for telecommunication in computer systems. It does not regard the underlying technology, but instead the layers involved in communication. Let us explore the different layers within the OSI Model:

开放系统互连(OSI)模型是计算机系统中电信的标准化模型。 它不考虑基础技术,而是考虑通信中涉及的层。 让我们探索OSI模型中的不同层:

1.应用层 (1. Application Layer)

This layer allows applications to communicate over the network once the connection has been established, such as from the Web Browser (Application) to the Server. Examples of protocols in this layer include HTTP and TELNET.

建立连接后,此层允许应用程序通过网络进行通信,例如从Web浏览器(应用程序)到服务器。 此层中的协议示例包括HTTP和TELNET。

超文本传输​​协议(HTTP) (HyperText Transfer Protocol (HTTP))

A set of rules for transferring files over the Internet. For example, when you enter the URL into the browser, the browser sends an HTTP request for the webpage. The host would then return the webpage, together with all the elements that are within, such as images, text, videos, styling fonts, etc.

一组用于通过Internet传输文件的规则。 例如,当您在浏览器中输入URL时,浏览器发送对该网页的HTTP请求。 然后,主机将返回网页以及其中的所有元素,例如图像,文本,视频,样式字体等。

2.传输层 (2. Transport Layer)

This layer is responsible for the host-to-host communication of messages. Examples of protocols in this layer include TCP and UDP.

该层负责消息之间的主机到主机通信。 此层中的协议示例包括TCP和UDP。

传输控制协议(TCP) (Transmission Control Protocol (TCP))

The most common connection-oriented protocol. It defines how to establish and maintain a network conversation. It is responsible for establishing a connection (called a socket) between the client and the host in a 3-way handshake.

最常见的面向连接的协议。 它定义了如何建立和维护网络对话。 它负责通过三向握手在客户端和主机之间建立连接(称为套接字 )。

The user requesting the data will send a SYN data packet to the server, requesting synchronization. The server will then respond with a SYN-ACK to the user, indicating that it has acknowledged the data packet, and would like to connect as well. The connection is hence established when the user sends the last ACK to the server.

请求数据的用户将向服务器发送SYN数据包,从而请求同步 。 然后,服务器将向用户发送SYN-ACK响应,指示它已经确认了数据包,并且也希望进行连接。 因此,当用户将最后一个ACK发送到服务器时,建立连接。

TCP is the most common due to its elegance, in which it is able to offer the following:

TCP由于其优雅而最为常见,它能够提供以下功能:

Connection-oriented communication Establish a handshake protocol between end-points to ensure connection before data is exchanged, and transmit as a data stream (data packets).

面向连接的通信在端点之间建立握手协议,以确保在交换数据之前建立连接,并作为数据流(数据包)进行传输。

ReliabilityUsing checksums, it ensures that the data packets transmitted and received are the same. If there are missing/corrupted packets, it will request for re-transmission of the data packets by sending a NACK message to the sender.

可靠性使用校验和,可以确保发送和接收的数据包相同。 如果存在丢失/损坏的数据包,它将通过向发送方发送NACK消息来请求重新传输数据包。

OrderThe data packets are numbered and transmitted. As such, TCP will ensure that the received packets are re-ordered before delivering the application.

顺序数据包已编号并传输。 这样,TCP将确保在交付应用程序之前对接收到的数据包进行重新排序。

Flow ControlThe rate of data transmission is regulated to improve efficiency while preventing buffer overruns/underruns, where data is sent faster than the receiver is able to process it, and vice versa.The mechanics behind it are explained below in the TCP Slow Start section.

流控制调整数据传输的速率以提高效率,同时防止缓冲区超限/欠载,数据的发送速度比接收方处理数据的速度快,反之亦然。下面的“ TCP慢启动”部分介绍了其背后的机制。 。

MultiplexingBasically, it is able to send over multiple streams of information concurrently over the same socket. These are done through different ports on the socket. We will discuss the differences between Multiplexing and Pipelining further along in the article.

复用基本上,它能够在同一套接字上同时发送多个信息流。 这些是通过套接字上的不同端口完成的。 我们将在本文中进一步讨论复用和流水线之间的区别。

用户数据报协议(UDP) (User Datagram Protocol (UDP))

While similar to TCP, it is a connection-less protocol. It is the complete opposite of TCP, making it unreliable and unordered. Dropped packets will not be re-transmitted, causing gaps in the data.

与TCP类似,它是一种无连接协议。 它与TCP完全相反,因此不可靠且无序。 丢弃的数据包将不会重新传输,从而导致数据间隙。

However, that makes it best for time-sensitive applications, such as voice calls over the internet (VoIP). This is because it does not require the 3-way handshake before transmitting, making it fast. In addition, dropped data packets are not a problem in VoIP, as the human ear is very good at handling the short gaps that are typical with dropped packets.

但是,这最适合对时间敏感的应用程序,例如Internet上的语音呼叫(VoIP)。 这是因为在传输之前不需要3次握手,因此速度很快。 另外,丢弃的数据包在VoIP中也不是问题,因为人耳非常擅长处理丢弃的数据包通常存在的短间隙。

3.网络层 (3. Network Layer)

This layer is responsible for providing data routing paths for network connections. Basically, it moves data packets across the network with the most logical path.

该层负责为网络连接提供数据路由路径。 基本上,它通过最合理的路径在网络上移动数据包。

互联网协议(IP) (Internet Protocol (IP))

Defines the structure of the data packets, as well as labeling it with the source and destination information.

定义数据包的结构,并用源和目标信息标记它。

The source and destination information are in the form of IP Addresses, in which can be in the form 104.16.121.127(IPv4), or 2001:db8:0:1234:0:567:8:1(IPv6).

源和目标信息采用IP地址的形式,其格式可以为104.16.121.127 (IPv4)或2001:db8:0:1234:0:567:8:1 (IPv6)。

This layer is the root of the OSI model, where information is transmitted either in the Local Area Network (LAN) for the Link Layer, and a physical signal such as electrical, mechanical medium in the form of code words or symbols in the Physical Layer.

该层是OSI模型的基础,其中信息在链路层的局域网(LAN)中传输,并在物理层中以代码字或符号的形式传输物理信号,例如电气,机械介质。

可视化路线 (Visualising Routes)

Using tracert google.com, the route can be traced from the client-side (your computer) to the host (google.com).

使用tracert google.com ,可以从客户端(您的计算机)到主机(google.com)跟踪路由。

From above, you can see the route starting from my device 192.168.1.254 to the router 10.243.128.1, before passing through the Internet Service Provider (ISP) located in Portugal, and so forth.

从上方,您可以看到从我的设备192.168.1.254到路由器10.243.128.1的路由,然后经过位于葡萄牙的Internet服务提供商(ISP),依此类推。

互补层 (Complementary Layers)

TCP / IP模型 (TCP/IP Model)

IP is only responsible for the structure of the data packet. As such, it will not make amends if the data packet is corrupted, or dropped. This is where TCP comes into play, numbering the data packets before sending over to the client. At the client’s side, TCP will request for re-transmission of lost/corrupted packets, and then rearrange the packets of data.

IP仅负责数据包的结构。 这样,如果数据包损坏或丢弃,它不会进行修改。 这就是TCP发挥作用的地方,它先将数据包编号,然后再发送给客户端。 在客户端,TCP将请求重新传输丢失/损坏的数据包,然后重新排列数据包。

HTTP / TCP模型 (HTTP/TCP Model)

As we have mentioned earlier, HTTP can now make requests via the connection made by TCP Handshake. But how do they complement each other?

如前所述,HTTP现在可以通过TCP Handshake建立的连接发出请求。 但是它们如何互补?

HTTP Persistent Connections This would allow multiple HTTP request/response on a single TCP connection, as opposed to opening a new connection upon every request/response.

HTTP持久连接这将允许在单个TCP连接上进行多个HTTP请求/响应,而不是在每个请求/响应上打开新连接。

This is done through the HTTP Header, where Connection: Keep-Alive. On default, the connection will only close upon another response where Connection: Close is sent after 30 seconds of idle.

这是通过HTTP标头完成的,其中Connection: Keep-Alive 。 默认情况下,连接仅在空闲30秒后发送Connection: Close另一个响应时Connection: Close

TCP Slow StartAs mentioned before, TCP supports flow control. This is done through TCP Slow Start, which is a form of prevention for network congestion.

TCP慢启动如前所述,TCP支持流控制 。 这是通过TCP Slow Start(TCP慢启动)完成的,它是防止网络拥塞的一种形式。

The sender has a congestion window (CWND) and the receiver has a receiver window (RWND). If the data is larger than the congestion/receiver window, there would be a buffer under/overrun respectively.

发送方具有拥塞窗口(CWND),接收方具有接收方窗口(RWND)。 如果数据大于拥塞/接收器窗口,则将分别存在缓冲区下溢/溢出。

To prevent that, the sender will begin by sending a data packet with a small congestion window (CWND = 1), to slowly probe the receiver for its receiver window.

为防止这种情况,发送方将首先发送一个拥塞窗口较小(CWND = 1)的数据包,以缓慢地探测接收方的接收方窗口。

The receiver will respond with an acknowledge, prompting the sender to double the data packets each time until no acknowledge is received. At this point, the optimum number of data packets has been discovered, allowing other congestion control algorithms to keep the connection at this speed.

接收方将以确认响应,提示发送方每次将数据包加倍,直到未收到确认。 在这一点上,已经找到了最佳数量的数据包,从而允许其他拥塞控制算法将连接保持在此速度。

Working TogetherHence, TCP Slow Start is able to figure out the optimum number of data packets to send before the connection is closed. This will allow the amount of data sent from the host to the client to be optimized without the risk of buffer overrun (data is sent faster than it can be received).

携手合作因此,TCP慢启动能够找出数据包的最佳数目的连接被关闭之前发送。 这样可以优化从主机发送到客户端的数据量,而不会存在缓冲区溢出的风险(数据发送速度快于接收速度)。

其他HTTP功能 (Other HTTP Features)

HTTP管道 (HTTP Pipelining)

This feature in version HTTP/1.1 allows multiple requests to be sent at once on the same socket, without waiting for a response. However, it has been replaced by TCP Multiplexing in the newer version of HTTP/2.

HTTP / 1.1版中的此功能允许在同一套接字上一次发送多个请求,而无需等待响应。 但是,它已被更新的HTTP / 2版本中的TCP多路复用取代。

The key difference is that although both allow for multiple requests all at once on the same socket, Pipelining would still require responses to be sent in order. It means that if the items requested are in the order (A, B, C), the client would not receive item C if item B has not been delivered properly.

关键区别在于,尽管两者都允许一次在同一个套接字上同时处理多个请求,但流水线仍然需要按顺序发送响应。 这意味着,如果所请求的项目按顺序(A,B,C),则如果项目B的交付不正确,客户将不会收到项目C。

In Multiplexing, the order does not matter. This would allow quicker delivery time.

在多路复用中,顺序无关紧要。 这样可以缩短交货时间。

These methods are best used for the idempotent method, which are methods that respond independently of the number of times requested — for example, requesting a web page multiple times will respond to the same web page.

这些方法最适合用于幂等方法,这些方法与请求的次数无关地进行响应-例如,多次请求一个网页将响应同一网页。

并联连接 (Parallel Connections)

Ever opened a webpage and seen multiple components of the webpage (video bar, thumbnails, buttons) load simultaneously?

您是否曾经打开过网页并看到网页的多个组件(视频栏,缩略图,按钮)同时加载?

This is made possible with Parallel Connections, where there is more than one TCP Connection established at the same time, allowing these components to load concurrently instead of one after another.

并行连接使这成为可能,其中同时建立了多个TCP连接,从而允许这些组件并发加载,而不是一个接一个地加载。

However, although it might seem to load faster, it might be held back by the client’s limited bandwidth. If all Parallel Connections are competing for the limited bandwidth, each component will load proportionately slower, resulting in zero advantage in total loading speed.

但是,尽管它看起来加载速度更快,但是可能由于客户端的有限带宽而受阻。 如果所有并行连接都在争夺有限的带宽,则每个组件的负载将成比例地降低,导致总加载速度为零。

结论 (Conclusion)

With the OSI Model, we can easily understand the big picture of networks, and how they interact with each other from hardware to software.

使用OSI模型,我们可以轻松了解网络的概况,以及它们如何从硬件到软件相互交互。

In general, it is a great teaching tool as well as a reference for troubleshooting. The model is also useful for design, as it investigates the functions at every layer, forcing one to ponder over the design layer by layer.

通常,它是一个很好的教学工具,也是故障排除的参考。 该模型对于设计也很有用,因为它研究了每一层的功能,迫使人们逐层思考设计。

What I have gone through so far is the OSI 5-Layer Model, whereas there is also the OSI 7-Layer Model which also deals with Identification, Authentication and Data Encryption.

到目前为止,我所经历的是OSI 5层模型,而OSI 7层模型也处理标识,认证和数据加密。

This is Part 2 of the HTTP Introductions Series. You can read the first article about the importance of DNS Servers in Part 1. Let’s explore the structure of HTTP Requests next in Part 3!

这是HTTP简介系列的第2部分。 您可以在第1部分中阅读有关DNS服务器重要性的第一篇文章。 接下来,在第3部分中,我们将探讨HTTP请求的结构!

Hi! I’m Cher Don, currently pursuing a Major in Data Science. I’m the CTO of Paralegal Bot, and you can find my website below. Thanks for reading!

嗨! 我是Cher Don ,目前正在攻读数据科学专业。 我是律师助理的首席技术官,您可以在下面找到我的网站。 谢谢阅读!

Piqued;Quality Content We offer the best content for difficult to grasp concepts. We've been there, and felt the same you do…www.piqued.co

激怒 优质内容我们为难以理解的概念提供最佳内容。 我们去过那里,并且感觉和您一样…… www.piqued.co

翻译自: https://www.freecodecamp.org/news/an-introduction-to-http-understanding-the-open-systems-interconnection-model-9dd06233d30e/

电信计算机网络测试题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值