search
HomeCommon ProblemThe tcp/ip protocol is divided into several layers

The tcp/ip protocol is divided into several layers

Jul 23, 2019 am 09:25 AM
tcp/ipNetwork protocol

The tcp/ip protocol is divided into several layers

TCP/IP protocol includes link layer, network layer, transport layer and application layer.

TCP/IP protocol (Transmission Control Protocol/Internet Protocol) is not a simple protocol, but a set of special protocols, including: TCP, IP, UDP, ARP, etc., these are called sub-agreement. Among these protocols, the most important and famous are TCP and IP. Therefore, most network administrators call the entire protocol suite "TCP/IP."

Layering:

In computer networks, the actually applied network protocol is the TCP/IP protocol family, TCP/IP The application layer generally corresponds to the application layer, presentation layer and session layer of the OSI/RM model. The network interface layer of TCP/IP corresponds to the data link layer and physical layer of OSI/RM, while the transport layer and network layer are in two Corresponds well in the model.

1. Link layer

The link layer is sometimes also called the data link layer or network interface layer. It usually includes the device driver in the operating system and the corresponding network interface card in the computer. . Together they handle the details of the physical interface to the cable (or any other transmission medium). The protocols that link link layer addresses and network layer addresses include ARP (Address Resolution Protocol, Address Resolution Protocol) and RARP (Reverse Address Resolution Protocol, Reverse Address Resolution Protocol).

2. Network layer

The network layer handles the activities of packets in the network, such as routing of packets. In the TCP/IP protocol suite, network layer protocols include IP protocol (Internet Protocol), ICMP protocol (Internet Control Message Protocol, Internet Control Message Protocol) and IGMP protocol (Internet Group Management Protocol, Internet Group Management Protocol) .

3. Transport layer

The transport layer mainly provides end-to-end communication for applications on two hosts. In the TCP/IP protocol suite, there are two different transmission protocols: TCP (Transmission Control Protocol, Transmission Control Protocol) and UDP (User Datagram Protocol, User Datagram Protocol).

4. Application layer

The application layer is responsible for handling specific application details. Almost various TCP/IP implementations provide the following common applications: Telnet remote login, SMTP (Simple Mail Transfer Protocol, simple mail transfer protocol), FTP (File Transfer Protocol, file transfer protocol), HTTP (Hyper Text Transfer Protocol, Hypertext Transfer Protocol), etc.

Core protocol:

1. IP protocol

Internet Protocol IP is the heart of TCP/IP and the most important protocol in the network layer.

The IP layer receives the data packet sent by the lower layer (network interface layer, such as Ethernet device driver) and sends the data packet to the higher layer - TCP or UDP layer; on the contrary, the IP layer Also transmits data packets received from the TCP or UDP layer to lower layers. IP packets are unreliable because IP does nothing to confirm that the packets were sent in order or that they were not corrupted. An IP packet contains the address of the host that sent it (source address) and the address of the host that received it (destination address).

When high-level TCP and UDP services receive data packets, they usually assume that the source address in the packet is valid. It can also be said that IP addresses form the basis of authentication for many services, which believe that data packets are sent from a valid host. IP confirmation contains an option called IPsource routing, which can be used to specify a direct path between the source address and the destination address. For some TCP and UDP services, IP packets using this option appear to be delivered from the last system on the path, rather than from its true location. This option exists for testing purposes, indicating that it can be used to trick the system into making connections that are normally prohibited. Therefore, many services that rely on IP source addresses for verification will cause problems and be hacked.

2. TCP protocol

If there are sealed TCP data packets in the IP data packet, then IP will transmit them "upward" to the TCP layer.

TCP sorts packets and performs error checking while realizing connections between virtual circuits. TCP packets include sequence numbers and acknowledgments, so packets received out of order can be sorted and damaged packets can be retransmitted.

TCP sends its information to higher-level applications, such as Telnet service programs and client programs. Applications take turns sending messages back to the TCP layer, which passes them down to the IP layer, device drivers and physical media, and finally to the receiver.

Connection-oriented services (such as Telnet, FTP, rlogin, XWindows, and SMTP) require a high degree of reliability, so they use TCP. DNS uses TCP in some cases (to send and receive domain name databases), but uses UDP to convey information about individual hosts.

3. UDP protocol

UDP and TCP are on the same layer, but the order of data packets is wrong or retransmitted. Therefore, UDP should not be used for connection-oriented services that use virtual circuits. UDP is mainly used for query-reply-oriented services, such as NFS. Relative to FTP or Telnet, these services require a smaller amount of information to be exchanged. Services that use UDP include NTP (Network Time Protocol) and DNS (DNS also uses TCP).

Spoofing UDP packets is easier than spoofing TCP packets, because UDP does not establish an initial connection (also called a handshake) (because there is no virtual circuit between the two systems), that is to say, UDP-related services face more Big danger.

4. ICMP protocol

ICMP is located at the same layer as IP and is used to transmit IP control information. It is mainly used to provide information about the path leading to the destination address. ICMP "Redirect" messages inform the host of a more accurate path to other systems, while "Unreachable" messages indicate problems with the path. In addition, ICMP can cause the TCP connection to be terminated "gracefully" if the path becomes unavailable. PING is the most commonly used ICMP-based service.

The above is the detailed content of The tcp/ip protocol is divided into several layers. For more information, please follow other related articles on the PHP Chinese website!

Statement
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 agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.