Computer Network Top-Down Method Seventh Edition Chapter 2 Application Layer

This series is learning thoughts and conclusions. If there are any errors, please leave a message in the comment area to correct me

Links to series of articles

Chapter One Computer Network and Internet
Chapter Two Application Layer



Network applications are the reason for the existence of computer networks .

1. Application layer protocol principle

  The network core equipment does not work on the application layer, and network applications are restricted to the end system. This design method promotes the rapid development and deployment of network applications.
Insert picture description here

1.1 Network application architecture

  Application architecture (application architecture) is determined by the application designer how to organize the application on various end systems. The current two mainstream application architectures are: client-server architecture and peer-to-peer architecture.

1.1.1 Client-Server Architecture

  In the client-server architecture (client-server architecture) there is a host server that isalways open, which servesrequestsfrom the client host.

  In this architecture, there is no direct communication between different customers . The server has a fixed address, which is called an IP address.

  Common applications that use a client-server architecture include: global wide area network, file transfer, remote login (Web, FTP, Telnet), and email .

  In the application of this architecture, there are often cases where the server cannot keep up with all the requests of its clients. At this time, a data center with a large number of hosts is often used as the server.

1.1.2 P2P architecture

  In P2P architecture (Architecture P2P) having minimal (or no) dependence on a dedicated server in the data center. Application of discontinuity between hosts connected to the direct communication , of these hosts called peer (Use the peer) . The peer does not belong to the service provider and does not pass through a dedicated server. The server is used to track the user's IP address, but the packets between the user and the user do not pass through the server.

  Common P2P applications include: file sharing, peer-assisted downloading, Internet telephony, and video conferencing .

  P2P biggest feature is agreement from scalability (Self-Scalability) . In P2P applications, the increase of peers will generate more workloads, but since peers will distribute files to other peers, the service capabilities of the entire system will also be improved.

Insert picture description here

1.2 Process communication

  Communication is actually a process (Process) . A process is considered a program in the end system. When multiple different processes are running in an end system, they communicate with each other using the inter-process communication mechanism. Process on two different end systems across a computer network via the exchange packet (message) communicate with each other.

1.2.1 Client and server processes

  Each of the communication process, which will be recorded as one of the server (Server) , will be recorded as another client (Client) .

  We define the server and the client as follows: In a pair of process communication, the process that initiates the communication is marked as the client , and the process waiting for the contact at the beginning of the session is the server .

  For web applications, the browser is a client program, and the web server is a server process. For P2P , the peer who downloads the file is recorded as the client, and the peer who uploads the file is recorded as the server.

1.2.2 The interface between the process and the computer network

  By process known as a socket (socket) software interface to send packets to the network and receiving packets from the network. The socket is also known as the Application Programming Interface (API) between the application and the network .

  Application developers have only control over the transport layer: select the transport layer protocol and set some parameters (such as the maximum segment length).

1.2.3 Process addressing

  In order to send packets to a specific host, two types of information about the destination process are needed: the host address and the identifier of the process in the destination host.

  Host by IP address(IP address) identifier, and the identifier of the process on the host is the destination port number (port number) . Many popular applications have been assigned specific port numbers. For example, the web port number is 80 and the mail server port number is 25 .

1.3 Transportation services available to the app

We need to choose data transportation services based on reliable data transmission, throughput, timing, and security.

1.3.1 Reliable data transmission

  Some applications require no data loss, so for these applications, it is necessary to ensure that the sender's data is correctly and completely delivered to the receiver. If a protocol can provide such data transfer, then it is considered to provide reliable data transfer (reliable data transfer) .

  When a transport layer protocol does not provide reliable data transmission, some data at the sender may be lost, and these protocols may be used by loss-tolerant applications . For example, multimedia applications can withstand a certain degree of data loss.

1.3.2 Throughput

  In the process of process communication, the available throughput is the rate at which the sending process can deliver bits to the receiving process. The available throughput fluctuates over time, so certain protocols can ensure that the application runs at a certain throughput.

  Having a throughput required by the application is referred to as bandwidth-sensitive applications (bandwidth-sensitive file application) , there is no specific requirement out of the team is an elastic application (Elastic file application) .

1.3.3 Timing

  The transport layer protocol can provide timing guarantees, and timing guarantees can be implemented in multiple forms. This kind of service is more suitable for interactive real-time applications, such as VoIP, multi-party games, etc. For non-real-time applications, low latency is better than high latency, but there is no requirement for end-to-end latency.

1.3.4 Security

  The transport protocol can provide one or more security services for the application. For example, the message can be encrypted and sent, and decrypted when delivered to the receiving process.

1.4 Transportation services provided by the Internet

  The Internet provides two transport layer protocols for applications: TCP and UDP . Which one to choose depends on the characteristics of the application.

application data lost bandwidth Time sensitive
file transfer Can't be lost elasticity Do not
e-mail Can't be lost elasticity Do not
Web document Can't be lost Elasticity (a few kbps ) Do not
Internet phone/video conference Tolerate loss Audio (a few kbps ~ 1Mbps )
video ( 10kbps ~ 5Mbps )
Yes, 100 ms
Streaming audio/video Tolerate loss Same as above Yes, a few seconds
Interactive game Tolerate loss A few kbps ~ 10kbps Yes, 100 ms
Smartphone message Can't be lost elasticity Yes and no

1.4.1 TCP service

  When an application calls TCP as its transport protocol, it can obtain two services provided by TCP .

  1. For connection-oriented services,
      before the application layer datagram flows, TCP allows the client and the server to exchange transport layer control information (handshaking) to prepare for a large number of packet transmissions. After the handshake, a TCP connection should be established between the sockets of the two processes. After finishing the message sending, the connection needs to be disconnected.
      This connection is full-duplex, and both parties can send and receive messages at the same time.


  2.   The process of reliable data transmission service communication can deliver all data without errors and in proper order, without data loss and redundancy.

  The TCP protocol also has congestion control, etc., which can schedule processes to avoid the overall congestion of the Internet.

1.4.2 UDP Service

  The UDP service does not pass unnecessary services, does not have a handshake, and provides unreliable data transmission. UDP also has no congestion control.

1.5 Application layer protocol

  The application-layer protocol (application-layer protocol) defines how application-layer programs running on different end systems deliver messages, and specifically defines: message types, various message syntax, field semantics, when and how to send Message.

  Some application layer protocols are defined by RFC and are public. There are also proprietary protocols.


2. Web and HTTP

2.1 Overview of HTTP


To be continued

Guess you like

Origin blog.csdn.net/weixin_43762938/article/details/109332230