Concept and function of IP protocol the concept and function of TCP protocol three-time handshake process of TCP protocol the concept and function of the DNS relationship between HTTP and TCP, IP, and DNS
first, the concept and role of IP protocol
The concept of IP:
English for the Internet Protocol, translated into Internet Protocol, located in the network layer.
This Internet protocol sounds a bit exaggerated, but it's true because almost all systems using the network use the IP protocol. IP in the TCP/IP protocol family refers to the Internet Protocol, which occupies half of the protocol name, from which it is possible to know how important the IP protocol is. Here we need to pay attention to two concepts, IP and IP address, and maybe someone will confuse it. IP is actually the name of a protocol, and the IP address is an address.
The role of IP:
Send various packets to each other. If you want to ensure that the transmission to the other side, you need to meet a variety of conditions, the most important two conditions are IP address and MAC address.
(1) IP Address: Indicates the address to which the node is assigned
(2) MAC address: Refers to the fixed address that the NIC belongs to
(3) Difference: The IP address can be transformed, but the MAC address is basically not changed.
If you want to ensure that packets are routed to each other, you have to meet a variety of conditions, the most important of which are the IP address and the MAC address of the two.
What is an IP address? The IP address indicates the address to which the node is assigned. And what is the MAC address? The fixed address to which the network card for the MAC address belongs. Image a bit, MAC address is like our ID number, each MAC address is unique, and basically does not change. Why do I say this is basically not going to change? Because now we can modify the MAC address by software. The IP address can be paired with the MAC address.
Let's look at the use of the ARP protocol to communicate with MAC addresses
What is the ARP protocol? ARP protocol It is a protocol used to resolve the address, as long as we know the IP address of the communication side, we can detect the corresponding MAC address. This means that communication between IP is dependent on the MAC address.
Let's take a look at this diagram:
On the network, both sides of the communication usually have to go through multiple computers or network devices to connect to each other. And in the transit, will use the next station relay device MAC address to search for the next transit target, then we rely on the ARP protocol to deal with.
Ii. the concept and function of TCP protocol
(1) TCP concept: TCP English for transmission Control Protocol, translated into transmission protocol, located in the transport layer.
(2) What role does TCP have? It is to provide reliable byte stream service.
(3) What is a byte stream service. The so-called byte-stream service refers to the segmentation of chunks of data into packet-based packets for easy transmission.
(4) Why is the emphasis on reliability? Because it can transmit data to each other accurately and reliably. All in all, the TCP protocol is designed to make it easier to transfer big data to split data, and the TCP protocol verifies that the data is ultimately delivered to the other.
(5) How the TCP protocol can guarantee a reliable service. It employs a three-time handshake strategy. That is, after the packet is sent out with the TCP protocol, it will not ignore the situation after the transmission, it will want the other party to confirm whether the successful delivery.
Three, three handshake process of TCP protocol
Let's take a look at this diagram:
The TCP flag-syn and ACK are used during the handshake. The sending side first sends a packet of s with the SYN flag to each other. When received, a packet with the SYN/ACK flag is sent back to convey the acknowledgement. Finally, the sender sends back a packet with an ACK flag to the receiving end, which represents the end of the handshake. In addition to the three-time handshake to ensure the reliability of communications, TCP protocol and other means to ensure the reliability of communications, here I do not too much to explain, we can read the relevant information to understand the next.
Iv. The concept and role of DNS
(1) The concept of DNS: English is the domain Name System, translated into the field, located in the application layer.
(2) What is the role of DNS? It is the parsing service that provides the domain name to the IP address.
We usually visit a Web site, often using a hostname or domain name to access, rather than directly through the IP address. Why don't we use an IP address to access it. Because the IP address is a set of pure numbers, it is more difficult to remember. For example, our Geek Academy has an IP address of 121.42.104.52, while the domain name is www.itcen.cn. If we use the IP address to visit the website, it is very difficult to remember to live. And the domain name is easier to remember. However, computers and people are different, you need a computer to understand the name, relatively more difficult. Computers are better at dealing with a long list of numbers. In order to solve this problem, there is a DNS service. DNS protocol It is a service that provides a domain name to look up an IP address, or reverse a domain name from an IP address.
v. The relationship between HTTP and TCP, IP, and DNS
Finally, we look at the relationship between HTTP and TCP, IP, and DNS through a graph to see what they do in the process of communication.
<iframe id= "Iframe1104309_0" src= "http://pos.baidu.com/gcym?sz=200x200&rtbid=1971540&rdid= 9223372032564593756&dc=2&di=1104309&dri=0&dis=0&dai=7&ps=372x0 &dcb=baidu_ssp_define&dtm=baidu_dup_setjsonadslot&dvi=0.0&dci=-1&dpt= none&tsr=0&tpr=1459336942108&ti=ip%e3%80%81tcp%e5%92%8cdns%e4%b8%8ehttp%e4%b9%8b%e9%97 %b4%e6%9c%89%e4%bd%95%e5%85%b3%e7%b3%bb%ef%bc%9f%20-%20%e7%ab%99%e9%95%bf%e4%b9%8b%e5%ae%b6&ari=1& Amp;dbv=2&drs=3&pcs=1334x713&pss=1334x6866&cfv=17&cpl=12&chi=1 &cce=true&cec=utf-8&tlm=1459336947&ltu=http%3a%2f%2fwww.chinaz.com%2fweb% 2f2015%2f1203%2f478634.shtml&ltr=https%3a%2f%2fwww.baidu.com%2flink%3furl% 3dubxx1lr2ebvjp-zxf3s6rapwbo4ak4iiniiiwwpax_6tmsoovebybmxv4mt9axpl-5jbgllfakbf3-qwb8ccek%26wd%3d%26eqid% 3da345697900041d650000000656fbb6d8&lcr=httPs%3a%2f%2fwww.baidu.com%2flink%3furl%3dubxx1lr2ebvjp-zxf3s6rapwbo4ak4iiniiiwwpax_ 6tmsoovebybmxv4mt9axpl-5jbgllfakbf3-qwb8ccek%26wd%3d%26eqid%3da345697900041d650000000656fbb6d8&ecd=1 &psr=1440x900&par=1440x827&pis=-1x-1&ccd=24&cja=true&cmi=35 &col=zh-cn&cdo=-1&tcn=1459336948&qn=9e3172c9c7c7ef45&dpv= 589a5fe494418b8c&tt=1459336941891.5844.5873.5883 "width=" "height=" "align=" Center,center "vspace=" 0 "hspace=" 0 "marginwidth=" 0 "marginheight=" 0 "scrolling=" no "frameborder=" 0 "allowtransparency=" true "style=" display: Block border-width:0px; Vertical-align:bottom; margin:0px; " ></iframe>
First of all, I want to visit the website, send the domain name to DNS to resolve, DNS resolves the IP address of the Web site back to the client, and then the IP address to initiate an HTTP request. The purpose of HTTP at this time is to generate an HTTP request message against the target Web server (which we refer to as the Web site), and then send the request to the transport layer, at which point the TCP will split the HTTP request message into a message segment, which will have a sequence number, The message segment here first sends which one arrives first, and they are delivered sequentially. As long as a TCP connection is established, the message exchange between the client and the server is not lost, is not corrupted, and does not appear in the wrong order at reception. Then to the network layer, at this time the role of IP protocol is to search the other side of the address, one side of the transfer. And then found the location of the server, at this time the server's transport layer in the TCP responsibility is received the other party sent over the message section, the reorganization, the reorganization here is by serial number reorganization. Then to the application layer of the server, HTTP will process the content requested by the client. After processing, the server will also use the TCP/IP communication protocol to the client for the callback response. After the client receives the response, the content Output page is displayed. That completes an HTTP transaction.
Reprinted from: http://www.chinaz.com/web/2015/1203/478634.shtml