[HTTP] C1-Web and network infrastructure

Introduction: When the input url in the address bar of the browser ...

According to the Web browser address bar of the specified url, Web browsers get files from the Web server resources (resource) and other information, thus showing Web pages.

HTTP (HyperText Transfer Protocol, Hypertext Transfer / Transfer Protocol)

Client (client): server resources by sending a request to obtain the Web browser, etc.

WWW building technology , are:

The SGML (Standard Generalized Markup Language, Standard Generalized Markup Language) as a page of text markup language HTML (HyperText Markup Language, HTML);

As HTTP document transfer protocol;

URL address where the designated document (Uniform Resource Locator, uniform resource locator).

TCP / IP protocol suite is all kinds of Internet-related protocol suite generic name, HTTP belongs to a subset within it.

Narrow: TCP / IP refers to both TCP and IP protocols.

There is a saying that, TCP / IP is the IP protocol communication process, in general terms to the protocol family.

TCP / IP protocol suite hierarchy
It is hierarchically divided into four layers: the application layer, transport layer, network layer and the data link layer.

Application layer

The application layer determines the communication activities of providing application services to users.

  • FTP (File Transfer Protocol, File Transfer Protocol)
  • DNS (Domain Name System, the domain name system)
  • Also in the HTTP protocol layer.

Transport layer
transport layer to the upper application layer, data transmission is provided between the two computers in a network connection.

  • TCP (Transmission Control Protocol, Transmission Control Protocol)
  • UDP (User Data Protocol, User Datagram Protocol).

The network layer (also known as network interconnection layer)
network layer for processing data packets flowing on the network. Packet is a minimum data unit transmission network. This layer defines how to reach the other side of a path through a computer (a so-called transmission line), and transmits the data packets to each other.
When transmission by a plurality of computers or other network device between the computer, the network layer is to choose the role of a transmission path in many options.
Link layer (also known as the data link layer, network interface layer)
to handle the hardware part of the network connection. It comprises a control operating system, hardware, device drivers, NIC (Network Interface Card, a network adapter, i.e. NIC), and the visible portion of the optical fiber and other physical (including all further connected to transmission media, etc.).

It is visible on the hardware within the scope of the link layer.

TCP / IP communications transport stream

Package

HTTP protocol with the close: IP, TCP and DNS
1. responsible for the transmission of IP protocol

IP (Internet Protocol) Internet Protocol located in the network layer , the role of the various transport data packets to each other

Indicates the IP address is assigned to the node address, MAC address refers to a fixed address belongs to the network card.

IP address and MAC address pair.

IP address conversion, but does not substantially change the MAC address.
Using the ARP protocol to communicate with the MAC address, the IP address of the communication party can find out the MAC address of the corresponding trans.

No one can fully grasp the transport situation in the Internet

Routing : The transfer process before reaching the communication objectives, those computers and routers and other networking equipment can only be learned very rough transport routes. 2.

2. Ensure the reliability of the TCP protocol

Divided by level, TCP located on the transport layer , provides reliable byte stream service.

字节流服务(Byte Stream Service)是指,为了方便传输,将大 块数据分割成以报文段(segment)为单位的数据包进行管理。

可 靠的传输服务是指,能够把数据准确可靠地传给对方。

一言以蔽之, TCP 协议为了更容易传送大数据才把数据分割,而且 TCP 协议能够 确认数据最终是否送达到对方。

三次握手 (three-way handshaking)策略。

用 TCP 协议把数据包送出去后,TCP 不会对传送后的情况置之不理,它一定会向对方确认是否成功送达。

握手过程中使用了 TCP 的标志(flag) —— SYN(synchronize) 和 ACK(acknowledgement)。

发送端首先发送一个带 SYN 标志的数据包给对方。

接收端收到后, 回传一个带有 SYN/ACK 标志的数据包以示传达确认信息。

最后,发 送端再回传一个带 ACK 标志的数据包,代表“握手”结束。

若在握手过程中某个阶段莫名中断,TCP 协议会再次以相同的顺序发 送相同的数据包。
除了上述三次握手,TCP 协议还有其他各种手段来保证通信的可靠 性。

3.负责域名解析的 DNS (Domain Name System)服务

DNS(Domain Name System)服务是和 HTTP 协议一样位于应用层的 协议。它提供域名到 IP 地址之间的解析服务。

DNS 协议提供通过域名 查找 IP 地址,或逆向从 IP 地址反查域名的服务。

URI 和 URL

URI( Uniform Resource Identifier 统一资源标识符)

URL(Uniform Resource Locator,统一资源定位符)

URL 是 URI 的子集。

绝对 URI 的格式:

协议方案名:使用 http: 或 https: 等协议方案名获取访问资源时要指定协议类型。不 区分字母大小写,最后附一个冒号(:)。 也可使用 data: 或 javascript: 这类指定数据或脚本程序的方案名。
登录信息(认证)
指定用户名和密码作为从服务器端获取资源时必要的登录信息(身份 认证)。此项是可选项。
服务器地址
使用绝对 URI 必须指定待访问的服务器地址。地址可以是类似 hackr.jp 这种 DNS 可解析的名称,或是 192.168.1.1 这类 IPv4 地址 名,还可以是 [0:0:0:0:0:0:0:1] 这样用方括号括起来的 IPv6 地址名。
服务器端口号
指定服务器连接的网络端口号。此项也是可选项,若用户省略则自动 使用默认端口号。
带层次的文件路径
指定服务器上的文件路径来定位特指的资源。这与 UNIX 系统的文件 目录结构相似。
查询字符串
针对已指定的文件路径内的资源,可以使用查询字符串传入任意参 数。此项可选。
片段标识符
使用片段标识符通常可标记出已获取资源中的子资源(文档内的某个 位置)。但在 RFC 中并没有明确规定其使用方法。该项也为可选 项。

RFC(Request for Comments,征求修正意见书)是互联网的设计文档

并不是所有的应用程序都符合 RFC

Guess you like

Origin www.cnblogs.com/lyplucky/p/12159123.html