HTTP protocol-a simple understanding of TCP/IP protocol

Source: Internet
Author: User
I have not studied computer science in the university, so I do not know a lot of professional knowledge. Now that you are already engaged in the IT industry, IT is necessary to understand the bottom layer of the network, although these things are not used in actual work. High-rise buildings

I have not studied computer science in the university, so I do not know a lot of professional knowledge. Now that you are already engaged in the IT industry, IT is necessary to understand the bottom layer of the network, although these things are not used in actual work. High-rise buildings, from Pingchuan. Without accumulating steps or even thousands of miles, without accumulating small streams, it cannot become a sea of rivers and seas. My current knowledge structure is like a castle in the air. If you encounter a high-level problem, you may not be able to understand it. If a big tree is not rooted in its roots at the beginning, it will use all its power to grow and blossom the leaves. When the storm strikes, when the Internet is low, everything comes from a difficult life, it is easy to overturn.

My ideal is to be a knowledgeable person with a wealth of professional knowledge, enough to deal with problems at work. In addition to work, you can read books to improve your temperament.

 

1. what is TCP/IP?

If you want to know a person, you can chat from the group where he belongs. Our HTTP protocol is a member of the TCP/IP protocol family. we understand the status of HTTP in the entire network flow and can fully understand HTTP.

To understand what the TCP/IP protocol is, you need to know why it is. Chinese people and Chinese people must follow the Chinese syntax structure and use the Chinese pronunciation. When we talk to foreigners, we need to apply foreign languages and follow foreign grammar institutions and pronunciations. In fact, this is a protocol, but we call it a language. Computers are more intuitive in this aspect. how can we communicate with each other? a variety of protocols need to be developed. For example, the TCP protocol is applicable to file transmission. The DNS protocol is applicable to the domain name system. With the existence of some protocols, various data streams are transmitted according to rules, and computers are proud to communicate with each other.

TCP/IP protocol is a set of protocols. When you call it, it is called TCP/IP. An important concept in the TCP/IP protocol family is layering. TCP/IP protocols are divided into the following layers. Application layer, transmission layer, network layer, and data link layer. Why layer? This is like Deng Xiaoping's big contractor in 1978, responsible for people. One layer is only responsible for one level of problems. if a problem occurs, it is irrelevant to other layers, as long as this level is maintained. In fact, programming languages can also reflect this layered theory, that is, encapsulation and isolation. I will not go into detail here. Below is a simplified figure.

Below are the TCP/IP communication data streams found on the network

 

2. protocols with close HTTP relationships: IP, TCP, and DNS

IP protocol:IP address (Internet protocol), the IP address here is not worthy of what we usually call 192.168.1.1. this IP address refers to a protocol, and the following number is worthy of being an IP address. The IP protocol is used to accurately transmit various data packets to the other party. The two important conditions are IP addresses and MAC addresses ). Because the IP address is a rare resource, it is impossible for everyone to have an IP address. Therefore, the common IP address is the IP address generated by the router. the MAC address is recorded in the router. The MAC address is the only one in the world and cannot be repeated except for human factors. For example, in real life, the IP address is like the address of our residential area, and the MAC address is the person in the room in the building where we live. For more information about the MAC address, click connect to view Baidu. The following content is excerpted from graphic HTTP

Use ARP to communicate with MAC addresses

The communication between IP addresses depends on the MAC address. On the network, there are very few communication parties in the same LAN. Generally, they can connect to each other only after multiple computers and network devices. During the transfer, the MAC address of the next transfer device is used to search for the next transfer target. Address Resolution Protocol is used ). ARP is a protocol used to parse an address. based on the IP address of the communication party, the corresponding MAC address can be retrieved.

If you are interested, refer to the Address Resolution Protocol (ARP). For more information, Baidu encyclopedia is much better than Wikipedia.

You can send a message to another computer. how can you find the other computer in the dark:

 

TCP protocol:If the IP protocol finds the detailed address of the other party. Therefore, the TCP protocol is to bring things securely to the other party. Each has its own division of labor and does not conflict with each other.

By layer, TCP is a transport layer that provides reliable byte stream service. What is byte stream service? This name sounds unknown. let me explain it in plain words. The so-called byte stream is actually similar to information cutting. For example, if you are a bicycle seller, you have to deliver the goods. The installed bicycle is too large, unstable, and prone to damage. It is better to split the bicycle directly and paste the name of the consignee on each part. After delivery, the bicycles belonging to the same person are assembled. the process of dismantling, transportation, and assembly is actually the process of TCP byte stream.

Let's take a look at the rigorous academic expression:

The Byte Stream Service (Byte Stream Service) refers to the management of data packets in segments to facilitate transmission. Reliable transmission means that data can be transmitted to the other party accurately and reliably. In a word, the TCP protocol separates data for easier transmission of big data, and the TCP protocol can confirm whether the data is finally sent to the other party.

TCP adopts the famous three-way handshaking strategy to ensure that the information is accurate and accurate. next I will write a dialog to simulate the three handshakes.

DNS:DNS (Domain names System) is a service at the application layer like HTTP protocol, providing resolution services between Domain names and IP addresses.

The Internet communicates with each other through IP addresses, but the IP addresses do not conform to the recognition and memory habits. people like to remember meaningful words. So the DNS service is born to solve this problem. In fact, it is very understandable, like the host file on our computer.

192.168.1.11 roverliang.com

When we access roverliang.com, the computer will not go to the Internet server to query, directly access 192.168.1.111. This is a simple domain name hijacking, which is enough to explain the meaning of DNS.

The following is the role of various protocols in accessing a webpage.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.