


[HTTP] Detailed explanation of tcp/ip link layer network layer transport layer application layer
1. The seven-layer protocol can be simplified into a four-layer protocol
Link layer network layer transport layer application layer
2. Two networks connected through a router
The network layer ip provides a hop-by-hop protocol, which provides an unreliable service that may be lost in the middle.
The transport layer tcp provides a reliable transport layer based on ip
Metaphor : tcp is the Taobao seller, and ip is the package. If the package is lost in the middle, the seller will resend a package. There will be a confirmation process.
3.udp is unreliable, it will not confirm, and it will be lost if it is lost. Lost, for example, voice uses this, syslog also uses this
4.icmp subsidiary protocol, ping uses this
5. Encapsulation, each layer will leave its own mark. , add a header starting from the application layer, add a header to tcp, add a header to ip, add a header to Ethernet, and encapsulate it into a frame; the data length of the frame is between 46~1500 bytes
6. Divided, the receiver is divided. From the above encapsulation, extract the header
7. Port number, the source port number is usually randomly assigned, and the destination port number is usually a well-known port or For the designated port, be sure to pay attention to whether it is going out or returning, because tcp is full-duplex
8. Link layer, Ethernet and ieee 802 encapsulation
To distinguish between Ethernet and 802.3 encapsulation, you only need to look at Ethernet encapsulation is a 2-bit type, and 802.3 encapsulation is 2-bit long. We generally see Ethernet frames, and rarely see 802.3 frames.
There are only three Ethernet headers, source, destination, and protocol. Type, 0800 represents the ip protocol
Other supplements:
1. The subnet mask tells us which is the network part and which is the host part. For example, the subnet mask is 255.0.0.0, and the ip is 13.0.0.0 tells us that 13 is the network part, and the rest is the host part
2. The gateway is to other network segments. Who should it be given to? For example, my gateway is 192.168.1.1. The function of the router is to connect to different network segments. Forwarding data
3. The MAC address is fixed in the chip when it leaves the factory. It is also called the physical address. It is a 48-bit binary system. What is displayed on the computer is a 12-digit hexadecimal system. For example, mine is 50-7B- 9D-25-B0-EF ipconfig /all
4. The computer network card has a mac address, and the computer has an ip address
5. Data packet: Data-source address-destination address-source mac address-destination mac address (router ) After passing the next hop, the mac address will be modified and transferred to the server step by step
[Recommended course: TCP/IP video tutorial]
The above is the detailed content of [HTTP] Detailed explanation of tcp/ip link layer network layer transport layer application layer. For more information, please follow other related articles on the PHP Chinese website!

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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.

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

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Linux new version
SublimeText3 Linux latest version
