The application layer application

Well, the most commonly used application layer can be described as an absolute supporting role in this course. That is to say, it is the first one to encounter it from the top down. Otherwise, I am afraid there is no sense of existence at all

The content of this article mainly focuses on understanding

Let’s go over the map again in the DNA before we start

A brief description of itself

The picture has to be played. The teacher did his best

  • You’ll learn it in other classes
  • This is the layer you use (mainly) as a bald programmer
  • At the application level, the network concept is abstracted and you can access the flow of data arriving at the socket (expanded later)
  • The content of this layer is equivalent to all data, and the data format that the application writes and records is up to you to define
  • Different applications use different formats of data:
    • HTTP (Hyptertext transfer Protocol) — World wide Web, as long as you are familiar with the Internet
    • FTP (File Transfer Protocol) to move data – ouch this connection server is familiar
    • SMTP (Sending Mail Transfer Protocol) Sends E-mail
    • IMAP (Internet Message Access Protocol) for receiving email – you have this option when setting up your email

In addition, the application layer protocol actually defines:

  • The type of information exchanged
    • Such as request or response
  • When and how does a process send and respond to messages
  • Message syntax
    • Which fields are in the message and how they are divided
  • Message Semantics
    • Meaning of the information in the field

The protocols at the application layer distinguish between open protocols (such as HTTP and SMTP) and proprietary protocols (such as A proprietary format defined by Skype)

Talk about sockets

A socket is a concept abstracted to act as an interface:

  • A process sends/receives messages to/from its socket
    • Like a door, like an API
      • The sending process pushes information out the door, depending on the transmission infrastructure on the other side of the door
      • The message is passed to the socket during reception

In short, the application layer is handled without having to deal directly with the rest of the process, and communicates via abstracted sockets — a process that is done only by the developers themselves

Expand it a little bit

In fact, I think it’s even clearer that in order to receive information, you have to have an identity, which is determined by the IP address and port number we’ll talk about later

A socket is an endpoint for communication. Each socket consists of an IP address and a port number. Each pair of processes communicating over the network requires a pair of sockets, one for each process.

At this point, just a little address

Can you tell what process is running from the IP address? Answer, no, everybody go IP, want to see port

There are four common TCP/IP address types

  • MAC address of Layer2 (link)
    • Also called a link address, it is the address of a node defined by its LAN or WAN
  • Logical address in Layer3 (network)
    • It’s called an IP address
    • Logical (IP) addresses are used for generic communication independent of the underlying physical network
  • Port address in Layer4 (transport)
    • Used to distinguish between different processes
  • Layer7 (Application) address specific to the application
    • Some applications have user-friendly addresses designed for specific applications, such as E-mail addresses, urls

Session and Presentation Layer

Unfortunately, these two are just theories

  • Session layer (Layer 5) :
    • Connects two hosts during the lifetime of the connection
    • Authentication + authorization (who is the user and what they can do)
      • The current Internet through the application layer
  • Presentation Layer (Layer 6) :
    • Transform data for the application
      • For example, dealing with the details of the character set used to encode strings
      • It’s actually in the application layer

Small topics