At the highest level of the Application Layer composition protocol stack, the protocol layer that is intimate with the user is the application layer. Components of the scene: browsers, HTTP servers, and so on.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/B3/wKiom1gZ76SRglKdAAA88gs5484992.png "title=" 1.png " alt= "Wkiom1gz76srglkdaaa88gs5484992.png"/>
Main content
1 Network Application Architecture
2. Process Communication
3 requires a transport layer to service
4 Application Layer Protocol
2 types of network applications architecture
Client-server architecture
Represents the protocol for HTTP. Features: (1) No direct communication between the client, (2) the server has a known IP, the server is always open.
Prone to performance problems: a single server often doesn't keep up with a huge amount of customer requests.
Peer architecture
Server requirements are relatively low, and applications can communicate directly with each other. Direct communication of the host called Peers, is generally a user-controlled host.
The advantages are self-extensibility, each peer adds service to the system, and the key is very cost-saving, without the need for huge server bandwidth.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/89/B0/wKioL1gZ8MvS_CCjAAGdOlsEEi8396.png "title=" 2.png " alt= "Wkiol1gz8mvs_ccjaagdolseei8396.png"/>
2. Process Communication
Computer network, different host process interaction messages, and then communicate with each other. In general, two communication processes, one for the client and one for the server. The process here, in fact, is generally the browser process, Ie,firefox and so on.
How does the process send messages to the network? Socket (socket) technology. Application developers can control the transport layer through sockets. Control content includes: (1) Select Transport Layer Protocol (TCP OR UDP);(2) to set the transport layer parameters. such as maximum cache, maximum message length.
Process addressing: Uniquely distinguishes the receive process, requires an address, including 2 kinds of information: 1. The address of the host; 2. The identifier of the receiving process. Where the host is identified by its IP. The process identifier is identified with a port number.
3 requires a transport layer to service
The transport layer serves the application layer and generally satisfies
Reliability (packet loss)
throughput (e.g., speed on the road)
Time Guarantee
Safety
Different applications, choose different network requirements
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/B1/wKioL1gZ9x-Cdzv_AADJZb3NO6s071.png "title=" 4.png " alt= "Wkiol1gz9x-cdzv_aadjzb3no6s071.png"/>
Popular use-layer protocols and supported transport-layer protocols
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/B3/wKiom1gZ-AuDOSCMAACpfjQ-kHY260.png "title=" 5.png " alt= "Wkiom1gz-audoscmaacpfjq-khy260.png"/>
4. Application Layer Protocol
Application-layer protocols define how applications running on different hosts pass messages to each other. Agreement content
(1) Type of message to be exchanged, request message or response message
(2) Message type syntax
(3) The semantics of the field, the meaning of the information contained in the field.
(4) When the process, how to send the message, the response rules of the message. is the processing mechanism.
4.1 HTTP protocol
HTTP defines how a Web client requests a Web page from a Web server and how the server transmits the response to the customer.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/F0/wKiom1gh2WGxpXTXAABmgGkL9Eo774.png "title=" 6.png " alt= "Wkiom1gh2wgxpxtxaabmggkl9eo774.png"/>
HTTP uses TCP as the support protocol.
1) Client initiates 1 TCP connections to the server
2) Once the connection is established, the browser and the server process access TCP through the socket.
3) The HTTP protocol does not have to worry about data loss, which is the work of TCP and protocol stack underlying protocols.
4) HTTP is a stateless protocol.
4.1.1 Non-persistent connection vs Persistent connection
Non-persistent connections: Each request/response is sent via a separate TCP connection.
Persistent connections: Each request/response is sent via a TCP connection with a limited purchase.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/ED/wKioL1gh2vHSbJbtAABzRVfVzew093.png "title=" 7.png " alt= "Wkiol1gh2vhsbjbtaabzrvfvzew093.png"/>
A TCP connection that involves a "3-time handshake" process.
RTT (Round-trip time): A group of times spent from the client to the server and then back to the client.
A RTT, including propagation delay, queue delay (on the router), processing delay.
4.1.2 Message Format
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/F0/wKiom1gh3KbjBBqqAABF-KsUx_U480.png "style=" float: none; "title=" 8.png "alt=" Wkiom1gh3kbjbbqqaabf-ksux_u480.png "/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/ED/wKioL1gh3KeRmowpAABFmmcZWDM744.png "style=" float: none; "title=" 9.png "alt=" Wkiol1gh3kermowpaabfmmczwdm744.png "/>
4.1.3 Cookie Record Status
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/89/ED/wKioL1gh3YywYRVwAAFvmDLGq8A473.png "title=" 10.png "alt=" Wkiol1gh3yywyrvwaafvmdlgq8a473.png "/>
Consists of 4 components.
A cookie header in an HTTP request message;
A cookie header line in the response message.
Client, browser manages cookie file
Back-end Web server Management
A cookie can identify a user and can track activity at the dot. But it also brings privacy issues.
4.2 FTP protocol
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/EE/wKioL1gh3uygYvvRAABmUOARiWM831.png "title=" 12.png "alt=" Wkiol1gh3uygyvvraabmuoariwm831.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/EE/wKioL1gh3znCzPXRAABBErna33o714.png "title=" 13.png "alt=" Wkiol1gh3znczpxraabberna33o714.png "/>
FTP uses 2 parallel TCP connections to transfer files, one for control connections and one for data connections.
Control connection user in two host direct Transmission control information, such as user ID, password, change remote directory command, put,get File command. (Out-of-band delivery). Control links throughout the user session
A data connection is used to actually send a file. A new data connection is created for each file transfer.
The FTP server must retain the state of the user and facilitate the tracking of the state of the user's session, thus limiting the total number of sessions.
4.3 email
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/F1/wKiom1gh4Z_iNJwfAADsWekqI1s779.png "title=" 14.png "alt=" Wkiom1gh4z_injwfaadswekqi1s779.png "/>
Consists of 3 parts.
User Agent (Foxmail,outlook)
Mail server (smtp.163.com ...)
SMTP (Simple Mail Transfer Protocol)
The mail server is the core of the e-mail architecture, with each recipient registering a mailbox (mailbox).
4.3.1
smtp:rfc5321 gives a definition.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/89/F1/wKiom1gh47DQMHxlAACROCO-Ung575.png "title=" 15.png "alt=" Wkiom1gh47dqmhxlaacroco-ung575.png "/>
SMTP port: 25
Format: ASCII 7-bit format
SMTP: Push protocol
4.3.2 Mail Access Protocol
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/89/F1/wKiom1gh5M3BBpzaAABl8Ws1PBI866.png "title=" 16.png "alt=" Wkiom1gh5m3bbpzaaabl8ws1pbi866.png "/>
POP3 (Third edition Post Office Protocol) RFC1939
IMAP (Internet Mail Access Protocol, Internet messaging, Access Protocol)
HTTP
POP3: The work port is 110. Three stages:
License: User agent sends user name and password to authenticate user
Transaction processing: The user agent takes the return text, also can do the deletion mark. "Download and delete", "Download and keep" mode
Update: Quit command to end POP3 session.
This article is from a "simple" blog, so be sure to keep this source http://dba10g.blog.51cto.com/764602/1870844
Application Layer of computer network