Home Operation and Maintenance Safety Detailed explanation of the five-layer protocol of the network

Detailed explanation of the five-layer protocol of the network

Nov 29, 2019 pm 04:54 PM
protocol network

Detailed explanation of the five-layer protocol of the network

1. Application layer

Tasks: Provide for operating system or network applications Access the interface of network services and complete specific network applications through interaction between application processes. The application layer defines the rules for communication and interaction between application processes

Common protocols:HTTP, SMTP, FTP, ping, telnet, DNS, DHCP, etc.

HTTP protocol (Hypertext Transfer Protocol)

Main features:

●Support client/server mode

●Simple and fast: Client When requesting services from the server, you only need to transmit the request method and path; commonly used request methods are GET, HEAD, POST, etc., each method stipulates different types of contact between the client and the server; the HTTP protocol is simple, the server program is small in size, and the communication speed is fast

● Flexible: HTTP allows the transmission of any type of data object; the data type being transmitted is marked by Content-Type

● Connectionless: Connectionless means that only one request is processed per connection ;After the server processes the client request and receives the client response, it disconnects and saves transmission time

●Stateless: Stateless means that the protocol has no memory capacity for transaction processing; the response is faster, but the transmission The amount of data is large

HTTP URL: Locate network resources

● http://host[:port][abs_path]

HTTP request

● Composed of three parts: request line, message header, request body

●Format: Method Request-URI HTTP-Version CRLF

●Method: Request method, GET, POST, etc.

●Request-URI: Requested HTTP protocol version

●CRLF: Carriage return and line feed

HTTP response

●It consists of three parts: status line, message header, response body

●Status line format: HTTP-Version Status-Code Reason-Phrase CRLF

●●HTTP-Version: Server HTTP protocol version

●Status-Code: Response status code returned by the server

HTTP status code

● Composed of three digits, the first digit defines the response category

1xx: Indication information, indicating that the request has been received and processing continues;

2xx: Success

3xx: Redirect, further operations must be performed to complete the request;

●4xx: Client error, the request has a syntax error or the request cannot be implemented

●5xx: Server-side error: The server failed Implement legal requests

Common status codes

● 200: OK, the request is successful;

● 400: Bad Request, the request has a syntax error, Cannot be understood by the server;

●401: Unauthorized, the request is unauthorized;

●403: Forbidden, the server received the request but refused to provide the service;

● 404: Not Found, the requested resource does not exist;

● 500: Internet Server Error, an unexpected error occurred in the server;

● 503: Server Unavailable, the server cannot handle the customer request

2. Transport layer

Task: Responsible for providing common data services for communication between processes in two hosts (for Applications on two hosts provide end-to-end communication)

Mainly uses the following two protocols:

Transmission Control Protocol TCP : Provides connection-oriented, reliable, Stream-based data transmission service, the unit of data transmission is a message segment. Use timeout retransmission, data confirmation, etc. to ensure that data is sent correctly to the destination

User Datagram Protocol UDP: Provides connectionless, unreliable, datagram-based data transmission Service; the unit of data transmission is user datagram

3. Network layer

Task: is responsible for data packets Perform routing and store-and-forward

● Responsible for providing communication services to different hosts on the packet-switched network. When sending data, the network layer encapsulates the message segments and user datagrams generated by the transport layer into packets (IP datagrams) or packets for transmission.

●IP protocol: hop-by-hop sending mode; determine how to send the data based on the destination IP address of the data packet; if the data packet cannot be sent directly to the destination, the IP protocol is responsible for finding a suitable next-hop router. And deliver the data packet to the router for forwarding

● ICMP protocol: Internet Control Message Protocol, used to detect network connections

4. Data link layer

Task: Responsible for allocating MAC addresses

●When data is transmitted between two adjacent nodes, the data link layer hands over the network layer IP datagrams are assembled into frames and transmitted over two adjacent links. Each frame includes data and necessary control information.

● The network driver of the network card interface handles the transmission of data on physical media; different physical networks have electrical characteristics, and the network driver hides implementation details and provides a consistent interface for upper-layer protocols

● Commonly used protocols: Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP) to achieve conversion between IP address and machine physical address (MAC address)

##5 .Physical layer

The unit of data transmitted by the physical layer is bit. The physical layer needs to consider what voltage is used to represent a 1 or a 0, and how the receiver recognizes the bits sent by the sender.

6. Working equipment corresponding to each layer

 ●Physical layer: repeater, hub

●Data link Road layer: bridge or switch

● Network layer relay system: router

● Relay system above the network layer: gateway

The above is the detailed content of Detailed explanation of the five-layer protocol of the network. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to adjust MTU size on Windows 11 How to adjust MTU size on Windows 11 Aug 25, 2023 am 11:21 AM

If you're suddenly experiencing a slow internet connection on Windows 11 and you've tried every trick in the book, it might have nothing to do with your network and everything to do with your maximum transmission unit (MTU). Problems may occur if your system sends or receives data with the wrong MTU size. In this post, we will learn how to change MTU size on Windows 11 for smooth and uninterrupted internet connection. What is the default MTU size in Windows 11? The default MTU size in Windows 11 is 1500, which is the maximum allowed. MTU stands for maximum transmission unit. This is the maximum packet size that can be sent or received on the network. every support network

WLAN expansion module has stopped [fix] WLAN expansion module has stopped [fix] Feb 19, 2024 pm 02:18 PM

If there is a problem with the WLAN expansion module on your Windows computer, it may cause you to be disconnected from the Internet. This situation is often frustrating, but fortunately, this article provides some simple suggestions that can help you solve this problem and get your wireless connection working properly again. Fix WLAN Extensibility Module Has Stopped If the WLAN Extensibility Module has stopped working on your Windows computer, follow these suggestions to fix it: Run the Network and Internet Troubleshooter to disable and re-enable wireless network connections Restart the WLAN Autoconfiguration Service Modify Power Options Modify Advanced Power Settings Reinstall Network Adapter Driver Run Some Network Commands Now, let’s look at it in detail

How to solve win11 DNS server error How to solve win11 DNS server error Jan 10, 2024 pm 09:02 PM

We need to use the correct DNS when connecting to the Internet to access the Internet. In the same way, if we use the wrong dns settings, it will prompt a dns server error. At this time, we can try to solve the problem by selecting to automatically obtain dns in the network settings. Let’s take a look at the specific solutions. How to solve win11 network dns server error. Method 1: Reset DNS 1. First, click Start in the taskbar to enter, find and click the "Settings" icon button. 2. Then click the "Network & Internet" option command in the left column. 3. Then find the "Ethernet" option on the right and click to enter. 4. After that, click "Edit" in the DNS server assignment, and finally set DNS to "Automatic (D

Fix 'Failed Network Error' downloads on Chrome, Google Drive and Photos! Fix 'Failed Network Error' downloads on Chrome, Google Drive and Photos! Oct 27, 2023 pm 11:13 PM

What is the "Network error download failed" issue? Before we delve into the solutions, let’s first understand what the “Network Error Download Failed” issue means. This error usually occurs when the network connection is interrupted during downloading. It can happen due to various reasons such as weak internet connection, network congestion or server issues. When this error occurs, the download will stop and an error message will be displayed. How to fix failed download with network error? Facing “Network Error Download Failed” can become a hindrance while accessing or downloading necessary files. Whether you are using browsers like Chrome or platforms like Google Drive and Google Photos, this error will pop up causing inconvenience. Below are points to help you navigate and resolve this issue

Fix: WD My Cloud doesn't show up on the network in Windows 11 Fix: WD My Cloud doesn't show up on the network in Windows 11 Oct 02, 2023 pm 11:21 PM

If WDMyCloud is not showing up on the network in Windows 11, this can be a big problem, especially if you store backups or other important files in it. This can be a big problem for users who frequently need to access network storage, so in today's guide, we'll show you how to fix this problem permanently. Why doesn't WDMyCloud show up on Windows 11 network? Your MyCloud device, network adapter, or internet connection is not configured correctly. The SMB function is not installed on the computer. A temporary glitch in Winsock can sometimes cause this problem. What should I do if my cloud doesn't show up on the network? Before we start fixing the problem, you can perform some preliminary checks:

What should I do if the earth is displayed in the lower right corner of Windows 10 when I cannot access the Internet? Various solutions to the problem that the Earth cannot access the Internet in Win10 What should I do if the earth is displayed in the lower right corner of Windows 10 when I cannot access the Internet? Various solutions to the problem that the Earth cannot access the Internet in Win10 Feb 29, 2024 am 09:52 AM

This article will introduce the solution to the problem that the globe symbol is displayed on the Win10 system network but cannot access the Internet. The article will provide detailed steps to help readers solve the problem of Win10 network showing that the earth cannot access the Internet. Method 1: Restart directly. First check whether the network cable is not plugged in properly and whether the broadband is in arrears. The router or optical modem may be stuck. In this case, you need to restart the router or optical modem. If there are no important things being done on the computer, you can restart the computer directly. Most minor problems can be quickly solved by restarting the computer. If it is determined that the broadband is not in arrears and the network is normal, that is another matter. Method 2: 1. Press the [Win] key, or click [Start Menu] in the lower left corner. In the menu item that opens, click the gear icon above the power button. This is [Settings].

How to enable/disable Wake on LAN in Windows 11 How to enable/disable Wake on LAN in Windows 11 Sep 06, 2023 pm 02:49 PM

Wake on LAN is a network feature on Windows 11 that allows you to remotely wake your computer from hibernation or sleep mode. While casual users don't use it often, this feature is useful for network administrators and power users using wired networks, and today we'll show you how to set it up. How do I know if my computer supports Wake on LAN? To use this feature, your computer needs the following: The PC needs to be connected to an ATX power supply so that you can wake it from sleep mode remotely. Access control lists need to be created and added to all routers in the network. The network card needs to support the wake-up-on-LAN function. For this feature to work, both computers need to be on the same network. Although most Ethernet adapters use

How to check network connection details and status on Windows 11 How to check network connection details and status on Windows 11 Sep 11, 2023 pm 02:17 PM

In order to make sure your network connection is working properly or to fix the problem, sometimes you need to check the network connection details on Windows 11. By doing this, you can view a variety of information including your IP address, MAC address, link speed, driver version, and more, and in this guide, we'll show you how to do that. How to find network connection details on Windows 11? 1. Use the "Settings" app and press the + key to open Windows Settings. WindowsI Next, navigate to Network & Internet in the left pane and select your network type. In our case, this is Ethernet. If you are using a wireless network, select a Wi-Fi network instead. At the bottom of the screen you should see

See all articles