Basic knowledge of computer network

1、 Computer network classification

Local area network (LAN) is a computer communication network formed by connecting various computers, servers and external devices within a local geographical range (such as an enterprise, a school or an Internet cafe), generally within a radius of thousands of meters.

Generally speaking, a metropolitan area network (man) is a computer Internet in a city with a distance of 10 ~ 100km. Man extends a longer distance and connects more computers than LAN. In a geographical range, man network can be said to be an extension of LAN network.

Wide area network (WAN), also known as remote network, covers a wider range than metropolitan area network and plays the role of network interconnection between LAN or man. Wan can connect multiple cities or countries, or span several continents, and can provide long-distance communication to form an international remote network. The Internet is the largest Wan in the world.

Generally speaking, computer network is composed of multiple computers, switches, routers and other network devices connected together through transmission media and software.

2、 Network layered model

In order to enable computers produced by different computer manufacturers to communicate with each other, so as to establish computer networks in a wider range, The international organization for Standardization (ISO) put forward the "open system interconnection reference model" in 1978, which is the famous OSI / RM model. It divides the communication protocol of computer network architecture into seven layers, from bottom to top, followed by physical layer, data link layer and network layer (network layer), transport layer, session layer, presentation layer and application layer. For each layer, at least two standards are formulated: service definition and protocol specification.

TCP / IP protocol is not the collective name of TCP and IP, but refers to the whole TCP / IP protocol family. TCP / IP protocol defines how electronic devices connect to the Internet and how data is transmitted between them. The protocol adopts a hierarchical structure of four layers, which are network interface layer, network layer, transport layer and application layer from bottom to top.

3、 IP address

On the network, each host (including network equipment) to communicate must also have an IP address. Its function is that other hosts can find it through this IP address.

Each IP address consists of two parts: network number and host number. The network number is used to identify which network this IP address belongs to. The host number is used to identify the only host in this network.

The length of the IP address is 32 bits, and every 8 bits form a part. In this way, an IP address can be divided into four parts. If each part is expressed in decimal, its value is between 0-255.

There are five types of IP addresses:

Class a address: the highest fixed position is always 0, plus the following 7 digits, a total of 8 digits represent the network number, and the remaining 24 digits represent the host number.

Class B address: the highest two digits are fixed at 10, which together with the following 14 digits constitute the network number, and the remaining 16 digits represent the host number.

Class C address: the highest three fixed digits are 110, which together with the following 21 digits constitute the network number, and only eight digits represent the host number.

Class D address: the highest four fixed bits are 1110, regardless of network address and host address. It is a specially reserved address and does not point to a specific network. At present, this kind of address is mostly used in multicast to address a group of computers at a time.

Class E address: the maximum five digits is 11110, regardless of network address and host address, which is reserved for future use.

In a network, not all host numbers can be assigned to the host. Two host numbers have special meanings. One is the host number of all 0, indicating the network itself; One is the host number of all 1, indicating the broadcast address.

In addition, it should be noted that one network segment of class A, B and C addresses is applied to the internal LAN, which cannot appear on the actual Internet, that is, 10 network segments and 172.16 x. X to 172.31 x. X segment and 192.168 segment.

4、 Subnet mask

With the popularity of the Internet, IP network is less and less divided. Therefore, people have put forward many solutions, among which the more famous are subnet mask and IPv6.

Subnet mask is a bit mask used to indicate which bits of an IP address identify the network number and which bits identify the host number. Subnet mask cannot exist alone. It must be used in combination with IP address. Subnet mask has only one function, which is to divide an IP address into network address and host address.

For example, specify the subnet mask. If the first eight bits of A-type address are fixed by default, its default subnet mask is 11111111.00000000 00000000.00000000, i.e. 255.0 0.0 。 Now it is also very popular to use this method to identify the subnet mask: XX xx. xx. XX / 8, indicating the first 8 digits of the IP address, indicating the network number.

5、 Domain name

Domain name is the name of a computer or computer group on the Internet, which is composed of a string of names separated by dots. It is used to identify the electronic location of the computer during data transmission. Its main purpose is to replace the digital IP address to facilitate memory and writing.

Domain names can be divided into different levels, including top-level domain names, secondary domain names, etc. Top level domain names can be divided into two categories:

One is the national top-level domain name. More than 200 countries have assigned top-level domain names according to the iso3166 country code, such as CN in China, us in the United States, Kr in South Korea, etc.

The other is international top-level domain names, such as com for industrial and commercial enterprises, net for network providers, org for non-profit organizations, etc.

Secondary domain name refers to the domain name under the top-level domain name, such as the network name applied for registration by the domain name registrant under the international top-level domain name, such as Sohu, apple, etc. Under the national top-level domain name, the general secondary domain name represents the symbol of the registered enterprise category, such as gov, edu, etc.

6、 Other

1. TCP "triple handshake" process?

First handshake: when establishing a connection, the source sends a synchronize sequence numbers (SYN) packet (syn = J) to the destination and waits for the destination to confirm.

The second handshake: the destination receives the syn packet, confirms the syn of the source (ACK = j + 1), and also sends a syn packet (syn = k), that is, syn + ACK packet.

Third Handshake: the source receives the syn + ACK packet from the destination and sends an ACK (ACK = K + 1) to the destination. After the packet is sent, the source and destination complete three handshakes, and the source can send data to the destination.

2. TCP "four wave" process?

The flag bit is fin, indicating "request to release the connection";

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>