The application layer is also calledApplication Entity(AE), which consists of several specific application service elements (SASE) and one or more common application service elements (CASE).Each SASE provides specific application services, such as file transport access and management (FTAM), electronic message processing (MHS)Virtual terminalProtocol (VAP), etc.CASE provides a set of common application services, such as contact control service element (ACSE), reliable transportation service element (RTSE) and remote operation service element (ROSE).
The Open Systems Interconnection reference (OSI) reference model is an abstract hierarchical model.
OSI 7-layer network reference model:
Layer 7: Application Layer
Layer 6: Presentation Layer
Layer 5: Session Layer
Layer 4: Transport Layer
Layer 3: Network Layer
Layer 2: Data Link Layer
Layer 1: Physical Layer
TCP/IP protocol model:
Application Layer;
Transport Layer;
Internet layer/network layer;
Network Access Layer
Application Layer: This layer provides interfaces for applications used for communication and the underlying network used for message transmission.[1]
Network application is the reason for the existence of computer network, and the application layer is where the application layer protocol can exist and the network application can be realized.
application layer
application layer(Application layer)It is the seventh layer of the seven layer OSI model.Application layer directly andApplication Program InterfaceAnd provide commonNetwork application service。The application layer alsoPresentation layerMake a request.The application layer is the highest level of the open system, which directly provides services for the application process.Its function is to complete a series of services required for business processing while realizing communication between multiple system application processes. Its service elements are divided into two categories: public application service element CASE and specific application service element SASE
CASE provides the most basic services. It becomes the user of any user and any service element in the application layer, mainly for applicationsProcess communication, distributed system implementation provides basic controlmechanism;Specific services, such as document transmission, access management, job transmission, bank transaction, order entry, etc.These will involveVirtual terminal, job transfer and operation, document transfer and access management, remote database access, graphics core system,Open Systems InterconnectionManagement and so on.[2]
Application layer software
1. Network aware applications:
Application program refers to the software program used by people for network communication.Some end user applications are network aware programs, that is, they implement application layer protocols and can directly communicate with the lower layers of the protocol stack.E-mail clients and Web browsers are examples of this type of application.
2. Application layer service [1]
How to realize a network application
1. Select a suitable network application architecture;
2. Determine the client process and server process according to the selected network application architecture;
3. Determine the port numbers of the client process and the server process;
4. Determine the IP addresses of the client process and the server process;
5. Select an appropriate application layer protocol;
6. Consider the services required by network applications.[3]
Functional features
Announce
edit
The concepts and protocols belonging to applications are developing rapidly and widely used, which brings complexity and difficulty to the standardization of application functions.Compared with other layers, the application layer needs the most standards, but it is also the most immature layer.However, with the development of the application layer and the increase of various specific application services, a lot of research has been carried out on the standardization of application services,ISOSome international standards (IS) andDraft International Standards(DIS)。Therefore, the main functions and characteristics of the application layer are described by introducing some general protocol standards.
It mainly provides interfaces between applications on any end of the network。
Transport access and management
File shipping and remote file access are anycomputer networkThe two most commonly used applications.Document transportation andremote accessThe technology used is similar. It can be assumed that the file is located inFile serverOn the machine, while the user is on the customer's machine and wants to read and writepartThe key technology to transport these files and support most modern file servers is virtual file storage, which is an abstract file server.Virtual file storage provides customers with a standardizedInterfaceAnd a set of executable standardized operations.Hidden different internal parts of the actual file serverInterfaceSo that customers can only see the standard interface of virtual file storage, access and transport remote filesapplication program, you may not need to know all the details of various incompatible file servers.
E-mail
computer networkupperE-mailThe realization ofcommunication mode A revolution of.E-mailThe attraction of is that, like the telephone, it is fast and does not requireboth sidesAre present at the same time, and leave written messages for processing or multiple deliveryCopy。
ISO mark
althoughE-mailIt is considered as a special case of document transportation, but it has some special properties that are not common to all document transportation.Because,E-mail system First, a perfect human-computer interface should be considered, such as writing, editing and readingE-mailOfInterfaceSecondly, provide a postal service for transporting mailmanagement function, such as managing mailing lists and submittingnoticeEtc.In addition,E-mailAnother difference from general document transportation is that mail messages are the most highly structuredtext。In many systems, in addition to its content, each message has a large number of additional information fields, including the sender's name andaddress, the name and address of the receiver, the date and time of posting, the list of persons receiving the carbon copy, the expiration date, and the importanceGrade, security permissions, and many other additional information.In 1984, CCITT formulated a series of protocols proposed by X.400 called MHS (Message Processing System).ISO attempts to integrate them into the application layer of OSI, and calls themMOTIS(Message oriented positive switching system).Due to the lack of X.400 structure, this kind of absorption is not very simple.In 1988, X.400 was revised to matchMOTISConvergence.In this chapter we will introduce MHS.
Virtual terminal
Because of variousreasonIt can be said that the work of terminal standardization has completely failed.The OSI method to solve this problem is to define aVirtual terminalIn fact, it is only an abstraction of the actual terminalstateAn abstraction ofdata structure。This abstractiondata structureMay be determined bykeyboardAnd computer, and put the currentstateReflected inmonitorOn.Computers can query this abstractiondata structureAnd can change this abstract data structure to makescreenThe output appears on the.
Other functions
Other applications have been or are being standardized.Here, we would like to introducedirectory services Remote job entry, graphics and information communication.
(1)directory services : It is similar to an electronic phone book, providing services for finding people or finding available services on the networkaddressMethod.
(2) Remote job entry: allows users working on one computer to submit jobs to another computer for execution.
(3) Graphics: It has the function of sending drawings to remote display and plotting.
Contact Control Service Element] ACSE and up] [2] sup] Submit, Concurrency and Restore CCR b]
With the development of the application layer, various specific application services have increased. Most of the application layer services defined in ISO7498 have
It is classified into the Common Application Service Element (CASE), and many applications have some common parts of data, almost
All of these applications need to manage connections.In order to avoid that every new application has to start from scratch, ISO decided to
Some public parts are standardized.The two most important are described below.
(1) Contact Control Service Element ACSE
The contact control service element provides the function of establishing application connections and releasing them normally or abnormally.
The so-called connection refers to the connection between two application entities;The contact control service element is the basic core subset of the application layer
。The following ACSE primitives are proposed:
1) A-ASSOCIATE establishes a connection
2) A-RELEASE Release a contact
3) A-Abort initiated by ABORT user
4) A-P-ABORT provider initiated abortions
Each ACSE primitive has a one-to-one mapping relationship with the corresponding presentation layer service primitive, that is, application connection and presentation connection
It is established and released at the same time.
(2) Commit, Concurrency, and Recovery (CCR)
The main purpose of CCR is to coordinate several (interrelated) application contacts, which is the information processing of basic multi application contacts
Management tasks provide a safe and efficient environment.Almost all applications requiring reliable operation use CCR.
In the CCR model, data are divided into two categories: safety data and conventional data. The so-called safety data are those that can withstand
Data that failed to be used and can be re referenced after the application contact is restored to normal.It usually stores the security data outside
Part of the storage medium.In order to ensure the integrity and reliability of safety data, some specific rules should be used to modify it,
For example, specific blocking mechanism.The so-called regular data are those that are not saved in reliable storage during application contact
Data of the area.For example, in the buffer or work stack.When the application contact is damaged, these data will no longer be available.
Protocol Example
Announce
edit
DNS
DNS was first established in 1983 by Paul MoccaJos(Paul Mockapetris);The original technical specification is No. 882Internet StandardsDraft (RFC 882).Draft Nos. 1034 and 1035 issued in 1987 amended the DNS technical specifications and abolished the previous drafts Nos. 882 and 883.After that, the revision of the draft Internet standard basically did not involve the DNS technical specificationpartChanges to.
Early domain names must end with a period of "." so that DNS can resolve domain names.nowadaysDNS serverThe ending period can be automatically filled in.
Currently, for domain nameslengthThe limit of is 63 characters, includingwww.and.comOr other extensions.The domain name is also limited toASCIIA subset of characters, which makes many other languages unable to correctly represent theirnameAnd words.The IDNA system based on Punycode code can translate Unicodecharacter stringMap to valid DNScharacter set, which has been verified andRegistration AuthorityAdopted as a workaround.
HTTP
The development of HTTP is the World Wide Web Consortium and the Internet Working Group(Internet Engineering Task Force)As a result of cooperation, (they) finally released a series ofRFCThe most famous one is RFC 2616.RFC 2616 definesHTTP protocolA widely used version of HTTP 1.1.
E-mail
HTTP is aclientAnd server-side request and response standards(TCP)。Client isend userThe server side is a website.through the use ofWeb browser、Internet wormOr other tools, the client initiates a command to the serverport(default port is 80)HTTP Request。(We call this client)user agent (user agent)。The response server stores (some) resources, such as HTML files andimage。(We call this response server the origin server.).There may be multiple middle layers between the user agent and the source server, such as the agent,gateway, or tunnel.althoughTCP/IPProtocol is the most popular application on the Internet. HTTP protocol does notregulationsYou must use it and (based on) the layers it supports.In fact, HTTP can be used in any otherInternet ProtocolOr on other networks.HTTP only assumes reliable transmission (provided by its underlying protocol), and any protocol that can provide this guarantee can be used by it.Usually, the HTTP client sends a request to establish a TCP connection to the server's designated port (port 80 by default).The HTTP server is therePort listeningThe request sent by the client.Once the request is received, the server sends back astateLine, such as "HTTP/1.1 200 OK", and (responsive)newsThe message body of the message may be the requested file, error message, or other information.
HTTP uses TCP instead of UDPreasonBecause (opening a) a web page must transmit a lot of data, andTCPThe protocol provides transmission control, organizes data sequentially, and corrects errors.For details, please refer to "Differences between TCP and UDP".
The resources requested through HTTP or HTTPS protocol areUniform Resource Locator(Uniform Resource Identifiers, or, more accurately, URIs).
FTP
The FTP service generally runs on ports 20 and 21.Port 20 is used for transmission between client and serverdata streamAnd port 21 is used for transmissioncontrol flow, and iscommandImport to ftp server.When data is transmitted through data stream,control flowIdlestate。And whencontrol flow, the client'sfirewall, its session will be set as timeout, which will cause some problems when a large amount of data passes through the firewall.At this time, although the file can be successfully transferred, it will be disconnected by the firewall because of the control session;Some errors may occur during transmission.
Objectives of FTP:
Promote file sharing (computer programs or data), encourage indirect or implicit use of remote computers to shield users from differenthostThe details of various file systems in theshortcoming:
Passwords and file contents are transmitted in clear text, which may cause unwanted eavesdropping.Because a random port must be opened to establish a connection, it is difficult for the client to filter actively when a firewall existspatternFTP traffic under.This problem has been solved by using FTP in passive mode.The server may be told to connect to a reserved port of a third-party computer.thismodeWhen a large number of small files need to be transferred, the performance of FTP is poor. Although FTP can be directly used by the end user, it is designed to be controlled by the FTP client program.
Many sites running FTP services open anonymous services. Under this setting, users can log in to the server without an account. By defaultsituationThe user name of an anonymous user is "anonymous".This account does not need a password, although it usually requires you to enter the user's emailaddressAs the authentication password, this is just some details or the email address is not determined at all, but depends onFTP serverConfiguration of.
The application layer protocol provides rules for communication between applications. To ensure smooth communication, the application layer protocols implemented on the source host and the destination host must be consistent.
Functions of application layer protocol:
L Define the process for both communication parties;
L Define the message type;
L Define the message syntax;
L Define the meaning of any informational field;
L Define the way to send messages and the expected response;