Thorough understand the meaning of IP address

xiaoxiao2021-03-06  58

Whether it is a learning network or an Internet, the IP address is a very high frequency. The interface for setting the IP address in the Windows system is shown in Figure 1. There is an IP address, subnet mask, default gateway, and DNS servers that need to be set. Only correct settings, the network can pass, that these nouns What do you mean? Study the relevant knowledge of IP addresses, will encounter network addresses, broadcast addresses, subnets and other concepts. What do you mean?

figure 1

To answer these questions, look at an example in your daily life. As shown in Figure 2, residents living in North Street must find each other, must have a house number, this house number is the address of each home, the number of the house number is: North Street XX. If the residents are to be hung by Households, the process is like this, and the No. 1 shouted on the street: "Who is No. 6, please answer." At this time, the households in North Street have heard, but only 6 Answer, this shouting process is "broadcast", all users of North Street are his broadcast range, and there are 20 users in North Street, and the broadcast address is: No. 21 North Street. In other words, any user of the North Street calls a "broadcast address -1" user to hear.

figure 2

From this example, you can extract the following words:

Street address: North Street, if an address to the street is used to use the address of the first household, this example is: North Street

Households: such as No. 1, No. 2, etc.

Household address: street address XX, No. 1 North Street, No. 2 North Street, etc.

Broadcast address: The address of the last household 1, this example is: No. 21 North Street

In the Internet network, each Internet has an address like the above example. This address is the IP address, which is the house number assigned to the network device. For the computer in the network, IP addresses = network address host address The IP address in Figure 1 is 192.168.100.1, which contains many meanings in this address. As follows:

Network address (equivalent to the street address): 192.168.100.0

Host address (equivalent to the door number of each household): 0.0.0.1

IP address (equivalent to household address): Network address host address = 192.168.100.1

Broadcast Address: 192.168.100.255

How does these addresses calculate? Why calculate these addresses? To know how, you must understand a truth. How to learn the network in the network, that is to say to learn and understand the concept of "Tong", not only for the back Several nouns.

Note: 192.168.100.1 is a private address, it is not possible to apply directly in the Internet network, and the Internet is converted to public addresses, which will be described in detail below.

First, why calculate the network address

One sentence is to let the computer in the network communicate with each other. Let's take a look at the simplest network, in Figure 3, using the network cable (cross wire) directly connect two computers. Below is a few IP address settings, see if the network in different settings is or not.

1. Set the IP address of the No. 1 machine to 192.168.0.1 subnet mask is from 255.255.255.0, the IP address of 192.168.0.200 subnet mask is 255.255.255.0, which can communicate normally.

2. If the address No. 1 is unchanged, the IP address of the No. 2 machine is changed to 192.168.1.200 subnet mask or 255.255.255.0, that two cannot be communicated. 3, set the IP address of the No. 1 machine to 192.168.0.1 subnet mask is 255.255.255.192, the IP address of the 192.168.0.200 subnet mask is 255.255.255.192, pay attention to the difference between the first situation is Subnet mask, 1 is 255.255.255.0 This example is 255.255.255.192 This computer will communicate normally.

image 3

The first case is perceived because the two computers are in the same network 192.168.0.0, so it can pass, and two computers in different networks in 2, 3 cases, so it is not.

Here, give a conclusion: a computer directly connected to a network or an indirect connection between Hub or a normal switch, the computer must be in the same network, that is, their network addresses must be the same, and the host address must Different. If it is not in a network, it will not pass. This is like the examples we have, the same is that the resident of North Street is the North Street because the street name is the North Street, and the number of house numbers can be found, so they can find each other.

The calculation network address is to determine that the computer in the network is not in the same network, and it can pass, it will not pass. Note that it is said that the IP address is not in the same network instead of physical connection. So how do you calculate?

Second, how to calculate the network address

The address in our daily life is: No. 1 North Street, you can see the street address from the literals is North Street, but we are difficult to see the network address from the IP address. To calculate the network address, we must use us to mention it. The subnet mask.

The calculation process is such that the IP address and subnet mask are converted into binary, then perform and calculate, the result is the network address. As shown below, the above alignment, 1 bit of 1 bit, 1 and 1 = 1, the remaining combinations are 0

Figure 4

For example, the IP address is: 202.99.160.50 Subnet mask is 255.255.255.0 network address steps as follows:

1) Convert the IP address and subnet mask to binary

202.99.160.50 Conversion into binary is 11001010 · 01100011 · 10100000 · 00110010

255.255.255.0 Conversion into binary is 1111111 · 11111111 · 1111111 · 00000000

2) Make two

Figure 5

3) Change the calculation result into a decimal, which is the network address.

11001010 · 01100011 · 10100000 · 00000000 Conversion into Ten Become is 202.99.160.0

Now we can answer the passions of the above three situations.

1. From the following operation results, it can be seen that the network address of the two computers is 192.168.0.0 and the IP address is different, so it can be passed.

Figure 6

2. From the following operation results, you can see the network address of 192.168.0.0, and No. 19 network address is 192.168.1.0 is not in a network, so it is not.

Figure 7

3. From the following operation results, you can see that the network address of 192.168.0.0 and 2 of 192.168.0.192 is not in a network, so it is not

Figure 8

I believe that this should understand why calculating the network address and how to calculate, but may have a lot of questions, why is the IP address written in this, the subnet mask is going to work, etc., don't worry, let's introduce it. (Send) (T101)

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

New Post(0)