How does the TCP/IP network communicate?

Source: Internet
Author: User

In a network that uses the TCP/IP protocol for communication, it can be visually understood as there are two envelopes. The TCP/IP and IP are like an envelope, and the information to be transmitted is divided into several segments, insert a TCP envelope into each segment, and record the information of the segment number on the envelope. Then, insert the TCP envelope into the IP address envelope and send the packet to the Internet. At the receiving end, a TCP software package receives the envelope, extracts data, restores the information in the order before sending, and verifies the information. If an error is found, TCP will request re-sending. Therefore, TCP/IP can transmit data almost without errors in the network.

But how do these messages arrive at the destination?

Let's take an example: Taking the figure as an example, Xiao K lives in H1 of village 1, and there is a post office H0 in the village, now, Xiao K has two emails respectively for the people in H3 and H1 of village 2 in the village 1. The address of the small K is: village 1. H1, and the address of the Post Office is: village 1. H0

The procedure is as follows:

Xiao K First attaches the envelopes to the recipient's address. The address of the first mail is village 1. H3, and the address of the second mail is village 2. H2.

Then, Mr. K compared the first address with his own address and found that the recipient of the first region was in the same village, so the simplest and economical way was to send the email by himself.

Next, Xiao K compared the second address and his address, and found that the recipient of the second letter was not in the same village, and even did not know how to get there, so Mr. K had to send the mail to the post office, which was sent by the post office.

The total number of messages is sent. Now let's summarize the elements required in this process.

First, you need an address. The address consists of two parts: one is which village you belong to, and the other is which room you live in.

Second, a post office is required to send messages from different villages. Note that messages from the same village do not need to be sent through the post office.

In a network that uses the TCP/IP protocol for communication, this address is an "IP address". The IP address consists of two parts: the network number and the host number ~ Composed of digits of 255. The network number is equivalent to the part of the village indicated in the address. The network number of a village is the same, and a network number represents a "subnet ". The host number is equivalent to the part of the House indicated in the address. However, the IP address does not specify which part is the network number and which part is the host number, and the "subnet mask" is also required to distinguish. Each computer in the network has its own IP address, which cannot be repeated. The post office is the router that implements the routing function. It knows how to send data to other subnets. Vrouters and other computers on the network have their own IP addresses. When the computer finds that the destination of the data to be sent is not in the same subnet as itself, it sends the data to the router. To enable a computer in the same subnet to identify a vro, You need to configure the IP address of the vro on the computer, which is called "GateWay" in the operating system ".

  1. Install TCP/IP network communication protocol for ASP
  2. Introduction to TCP/IP basic TCP/IP

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.