About us

Quality oriented, customer-oriented, hardworking, pragmatic and innovative

<Return to the public list of news

What does IP address, subnet mask, default gateway, DNS server mean

Release time: 2022-02-21 16:29:29

(a) Problem analysis

Q: IP address, subnet mask, default gateway and server? What are the differences between domain name systems

I know you can't get online without an IP address, and I know you can't get online without DNS, but what are their functions and differences? Also, it is strange that my computer does not have DNS and can access QQ, but cannot open the web page. Why?

Answer: IP is 32-bit binary data, usually expressed in decimal system and separated by ".". IP address is a logical address used to identify each host in the network. IP is unique, that is, the IP of each machine is unique in the world.

The domain name system is a domain name server, which is used to solve domain names (solutions between domain names and intellectual property rights). If not, you must enter the IP address of the website. With DNS, you can enter the web address directly.

Because you don't need DNS when you go to QQ (QQ is just a client program, you can't use DNS), so you only need DNS when you browse the web (you need to enter the web address).

(2) Server Domain Name System

:'LantingheiSC','OpenSans',Arial,'HiraginoSansGB','MicrosoftYaHei',STHeiti,'WenQuanYiMicroHei',SimSun,sans-serif; font-size:16px; line-height:32px; text-indent:2em; "> DNS refers to Domain Name Server. On the Internet, there is a one-to-one correspondence between domain names and IP addresses. Although domain names are easy for people to remember, machines can only know each other's IP addresses. The conversion between them is called domain name resolution. Domain name resolution needs to be completed by a special domain name resolution server. DNS is the server for domain name resolution.

(3) IP address

To realize network communication between computers, it is necessary to have a legal ip address.

IP address=network address+host address, (also called: host number and network number) The structure of IP address allows us to easily address on the Internet. The IP address is usually more intuitive. It is represented by four decimal digits separated by dots. Each digit ranges from 0 to 255. For example, the IP address of a host is 128.20.4.1. In the LAN, the IP address is also required. Generally, the IP address of the intranet starts with 192.168, which makes it easy to distinguish the IP addresses of the public network and the intranet. (In order to solve the problem of IP shortage, network experts put forward the concept of virtual IP. For Class C IP, the address of virtual IP can only start with 192.168.) IP address is a word with high frequency both in learning network and surfing the Internet The interface for setting IP addresses in the Windows system is shown in Figure 1. There are IP addresses, subnet masks, default gateways, and DNS servers that need to be set in the figure. The network can only be connected if they are set correctly. What are the meanings of these nouns? When learning about IP addresses, you will encounter concepts such as network addresses, broadcast addresses, and subnets. What are the meanings of these nouns

In the Internet network, every computer connected to the Internet has an address like the above example. This address is the IP address, which is the door number assigned to the network equipment. In order to allow computers in the network to access each other, IP address=network address+host address. The IP address in Figure 1 is 192.168.100.1, which contains many meanings, as shown below:

Network address (equivalent to street address): 192.168.100.0

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

IP address (equivalent to resident address): network address+host address=192.168.100.1

Broadcast address: 192.168.100.25

How are these addresses calculated? Why are these addresses calculated? If you want to know how, you should first understand a truth. The purpose of learning the network is to let computers in the network communicate with each other. That is to say, you should learn and understand the concepts in the network around the word "tong", rather than just memorize a few nouns

Note: 192.168.100.1 is a private address, which cannot be directly used in the Internet network. If you want to go to the Internet, you need to convert it to a public address, as detailed below

1、 Why calculate network address

In a word, let the computers in the network communicate with each other. First, let's look at the simplest network. In Figure 3, two computers are directly connected by network cable (cross cable). Here are several IP address settings to see whether the network is connected or not under different settings

1. Set the IP address of machine 1 to 192.168.0.1, the subnet mask to 255.255.255.0, and the IP address of machine 2 to 192.168.0.200, the subnet mask to 255.255.255.0, so that the next computer can communicate normally

2. If the address of Unit 1 does not change and the IP address of Unit 2 is changed to 192.168.1.200 or 255.255.255.0, the two cannot communicate

3. Set the IP address of machine 1 to 192.168.0.1, the subnet mask to 255.255.255.192, and the IP address of machine 2 to 192.168.0.200, the subnet mask to 255.255.255.192. Note that the difference from the first case is the subnet mask, which is 255.255.255.0. This example is 255.255.255.192. This computer can't communicate properly

Figure 3

The first case is that the two computers are in the same network 192.168.0.0, so they can be connected. In the second and third cases, the two computers are in different networks, so they cannot be connected

Here is a conclusion: computers directly connected with network cables or indirectly connected through HUB (hub) or common switches must be able to communicate with each other. Computers must be on the same network, that is, their network addresses must be the same, and their host addresses must be different. If they are not on the same network, they cannot communicate. This is just like the example above, Residents of the same North Street can find each other because their street names are North Street and their house numbers are different. Computing the network address is to judge whether the computers in the network are not in the same network, they can connect when they are in the same network, and they cannot connect when they are not in the same network. Note that what is said here refers to the IP address instead of physical connection when they are not in the same network. How to calculate it

2、 How to calculate the network address (subnet mask)

The address in our daily life, such as No. 1 North Street, can be seen literally that the street address is North Street, but we can hardly see the network address from the IP address. To calculate the network address, we must use the subnet mask mentioned above

The calculation process is as follows: convert the IP address and subnet mask into binary, and then perform the AND operation. The result is the network address. The AND operation is as follows: aligned up and down, 1 bit, 1 bit, 1 and 1=1, and other combinations are 0

Figure 4

For example, the steps to calculate the network address with an IP address of 202.99.160.50 and a subnet mask of 255.255.255.0 are as follows:

1) Convert IP address and subnet mask to binary respectively

202.99.160.50 converted to binary: 11001010 · 01100011 · 10100000 · 00110010

255.255.255.0 converted to binary is 11111111 · 11111111 · 11111111 · 00000000

2) And both

Figure 5

3) Convert the operation result to decimal, which is the network address

11001010 · 01100011 · 10100000 · 00000000 converted to decimal is 202.99.160.0

Now we can solve the problem of whether the above three situations are connected or not

1. From the following calculation results, it can be seen that the network addresses of both computers are 192.168.0.0 and their IP addresses are different, so they can communicate

Figure 6

2. From the following calculation results, it can be seen that the network address of Unit 1 is 192.168.0.0, and the network address of Unit 2 is 192.168.1.0, which is not in the same network, so it is not connected

Figure 7

3. From the following calculation results, it can be seen that the network address of Unit 1 is 192.168.0.0, and the network address of Unit 2 is 192.168.0.192, which is not in the same network, so it is not connected

Figure 8

I believe I can understand why and how to calculate the network address.

(4) Subnet mask

The subnet mask is used to determine whether the IP addresses of any two computers belong to the same subnet. The simplest understanding is that after the IP address and subnet mask of the two computers are ANDed, the result is the same, which means that the two computers are on the same subnet and can communicate directly.


/template/Home/Zkeys/PC/Static