IP and subnet detailed

xiaoxiao2021-03-06  42

First talk from the basis of the network, everyone knows that we usually divide the network into a local area network (LAN), Members Network (MAN) and WAN (WAN). Here, we will introduce the IP, gateway, subnet, and subnet mask from the LAN (LAN).

The Internet is a global network. For a large number of PCs, the method of understanding each other is through IP, this is as our ID card, which is also a representative of the INTERNET. The format of IP V4 is: 4 groups of 8-bit binary (32-bit binary). We know that the range of 8-bit binary representations is 0-255, so the IP address is often expressed in the decimal of 0-255 separated by a dot, which is the most commonly expressed manner of our daily. We know that the range of 32-bit binary representations is 0- (232-1), which seems to be an astronomical figure, but there is a large number of IP as a specific purpose, cannot be assigned to the Internet computer; on the other hand, online computer number is rapid Increased, so the IP address is facing the threat of exhaustion, so there will be IP V6 advent.

It is used to it, we divide the IP address to both part of the network number and host number, which leads out the concept of "subnet". For example, a company has obtained a paragraph of IP, in order to facilitate the centralized management of this paragraph IP, we introduce the concept of the subnet. Overall, our Internet is composed of a subnet, that is, the Internet is the main consisting of subnets and connecting subnets, and how we divide the IP inside the subnet from IP It is to let the IP of the same subnet have a common network number, and different hosts have different host numbers.

The process of populating the IP address population number and host number is the process of our IP and subnet mask, as follows.

Suppose a company has 172.1.1.0-172.1.1.255 this IP segment, then how do we express it? Of course, we can represent it as above, but the truly legal representation should be represented by the IP address and the subnet mask, expressed as 172.1.1.0/255.255.255.0 (or 172.1.1.0/24). Below we say how the IP and subnet mask work. One of them is analyzed as an example.

1. Firstly, the IP address and the subnet mask are indicated by 32-bit binary respectively:

IP mask 172.1.68 255.255.255.0 10010110 00000001 00000001 0100010011111111 11111111 111111 00000000

2. Press the IP address and the subnet mask to the "AND", get the result is the network number of this subnet:

IP 10010110 00000001 00000001 01000100 Subnet mask 11111111 11111111 11111110 000000 network number 10010110 00000001 00000001 000000000000

That is, the resulting sub-network number is 127.1.1.0. Similarly, we take any IP in this network to take the AND operation with the subnet mask, which will get the same network number, so we call 127.1.1.0 is this Segment IP network number. This is also the case, we only open this IP to other IP. Similarly, we take our IP address with the network number, it will get another result, that is, host number:

转载请注明原文地址:https://www.9cbs.com/read-62834.html

New Post(0)