TCP/IP Detailed learning notes (1)-Basic concepts

Source: Internet
Author: User
Tags rfc
Why would there be a TCP/IP protocol

All over the world, a wide variety of computers run different operating systems to serve everyone, and the methods used by these computers to express the same information vary widely. It is as if God in the Bible disrupts the accents of people everywhere and makes them unable to cooperate. Computer users realize that computers are only a one-man battle and do not play a big role. Only by uniting them will the computer play its greatest potential. So people are trying to connect the computer with the electric wire.

But simply connecting together is far from enough, as if two of people with different languages meet each other and cannot exchange information at all. So they need to define something in common to communicate, and that's how TCP/IP is born. TCP/IP is not a protocol, but a general designation of a protocol family. It includes IP protocols, IMCP protocols, TCP protocols, and more familiar HTTP, FTP, POP3 protocols, and more. Computers with these, as if learned a foreign language, you can and other computer terminals do free communication. TCP/IP protocol tiering

Referring to protocol layering, we can easily associate the Iso-osi seven-layer protocol classic architecture, but the TCP/IP protocol family structure is slightly different. As shown in the figure

TCP/IP protocol family in accordance with the level from top to bottom, layers of packaging. The top is the application layer, which has http,ftp, and so we are familiar with the agreement. The second layer is the transport layer, the well-known TCP and UDP protocols at this level (don't tell me you didn't use UDP to play StarCraft). The third layer is the network layer, where the IP protocol is responsible for the data plus the IP address and other data (described later) to determine the destination of the transmission. The fourth layer is called the data link layer, which adds an Ethernet protocol header to the data to be transmitted and CRC code to prepare for the final data transfer. And then down is the hardware level, responsible for the transmission of the network, this level of definition, including cable system, the definition of network cards and so on (which we do not care, we do not do card), so some books do not put this level in the TCP/IP protocol family, because it almost and tcp/ The creator of the IP protocol has no relationship. The host that sends the protocol encapsulates the data according to the Protocol, and the host receiving the data is untied according to the protocol and finally gets the required data. This structure is very stack flavor, so some articles also refer to the TCP/IP protocol family as the TCP/IP protocol stack. some basic common sense.

Before studying the agreement, we should have some basic knowledge. Internet address (IP address)

Each node on the network must have a separate Internet address (also known as an IP address). Now, the commonly used IP address is a 32bit number, that is, we often say the IPV4 standard, the 32bit number is divided into four groups, that is, the common 255.255.255.255 style. IPV4 Standard, the address is divided into five categories, we often use the class B address. Please refer to other documents for specific classification. It is important to note that the IP address is a combination of the network number + host number. Domain Name System

The domain Name system is a distributed database that provides services that convert the host name (that is, the URL) to an IP address. RFC

What the RFC is. The RFC is the standard document for the TCP/IP protocol, where we can see a long list of definitions for the RfC, and now it has a total of more than 4,000 agreements, of course, we have to learn, that is, then more than 10 protocols. Port Number (port)

Note that this number is used on the tcp,udp of a logical number, not a hardware port, we usually say that a certain port sealed off, but also at the IP level with this number of IP packets to filter out. Application Programming Interface

Now the common programming interface is socket and tli. And the front sometimes also called "Berkeley socket", visible Berkeley for the development of the network how much contribution.

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.