Simple organization of application layer

e-mail

Some standards for email

  • Protocol for sending mail: SMTP
  • Protocol for reading mail: POP3 and IMAP
  • MIME explains the data type of the mail (such as text, sound, image, video, etc.) in the mail header. Using MIME can transmit multiple types of data in the mail at the same time.

Insert picture description here

Several important steps for sending and receiving emails

  1. The sender calls the user agent in the PC to compose and edit the mail to be sent.
  2. The sender’s user agent sends the mail to the sender’s mail server using the SMTP protocol,
  3. The SMTP server temporarily stores the mail in the mail cache queue, waiting to be sent.
  4. The SMTP client of the sender's mail server establishes a TCP connection with the SMTP server of the receiver's mail server, and then the mails in the mail cache queue are sent out in sequence.
  5. After the SMTP server process running in the recipient's mail server receives the mail, it puts the mail into the recipient's user mailbox and waits for the recipient to read it.
  6. When the recipient intends to receive the mail, he runs the user agent in the PC and uses the POP3 (or IMAP) protocol to read the mail sent to him.
    Please note that the communication between the POP3 server and the POP3 client is initiated by the POP3 client.

Dynamic Host Configuration Protocol DHCP

The Dynamic Host Configuration Protocol (DHCP), which is widely used on the Internet, provides a plug-and-play networking mechanism. This mechanism allows a computer to join a new network and obtain an IP address without manual involvement.

DHCP uses client-server method

  • A host that needs an IP address broadcasts a discovery message (DHCPDISCOVER) to the DHCP server when it starts, and then the host becomes a DHCP client.
  • All hosts on the local network can receive this broadcast message, but only the DHCP server can answer this broadcast message.
  • The DHCP server first looks up the configuration information of the computer in its database. If found, return the found information. If it is not found, it will take an address from the server's IP address pool and assign it to the computer. The reply message of the DHCP server is called an offer message (DHCPOFFER).

DHCP relay agent

  • Not every network has a DHCP server, which will make the number of DHCP servers too large. Now every network has at least one DHCP relay agent, which is configured with the IP address information of the DHCP server.
  • When the DHCP relay agent receives the discovery message sent by the host, it forwards the message to the DHCP server in unicast mode and waits for its response. After receiving the offer message from the DHCP server, the DHCP relay agent sends the offer message back to the host.

Lease period

  • The IP address assigned by the DHCP server to the DHCP client is temporary, so the DHCP client can only use the assigned IP address for a limited period of time. The DHCP protocol calls this period the lease period.
  • The value of the lease period should be determined by the DHCP server itself.
  • DHCP clients can also put forward requirements for the lease period in the messages they send (for example, discovery messages).

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq1350975694/article/details/106982041