Experiment 1.3.1: Test whether the IP settings of the local host are correct

1, Please paste the screenshot of "ping 127.0.0.1" result into the experiment report.

2. Please paste the screenshot of the result of "ping the configured IP address of localhost" into the experiment report.

 

3. Please paste the screenshot of the result of "ping localhost" into the experiment report.

4. What is the difference between the results of "ping localhost" and "ping 127.0.0.1"?

A: The results are different. localhost is also called local, the correct explanation is: local server. The correct interpretation of 127.0.0.1 in Windows and other systems is: local address (local server). Their resolution is through the local host file, and windows automatically resolves localhost to 127.0.0.1. localhost (local) is transmitted without a network card! It is not restricted by network firewalls and network cards. 127.0.0.1 is transmitted through the network card, depends on the network card, and is subject to network firewall and network card related restrictions. Generally, it is best to use localhost for local services when setting up programs. localhost will not be resolved into ip, and will not occupy network card or network resources.

5. Please paste the screenshot of the "ping hostname" result into the experiment report.

 

6. What is the difference between the results of the command "ping hostname" and "ping localhost"?

Answer: The IP corresponding to the host name is the IP address of the machine, which is the same as the result of localhost.

7. What is the IP address corresponding to the host name? Is it consistent with the configured IP address? Please fill in the results in Table 1-8.

Table 1-8 Host names and their IP addresses

CPU name

Configured IP address

IP address in ping result

Whether the IP addresses are consistent

CsdDt

192.168.2.103

192.168.2.103

yes

 

 

Guess you like

Origin blog.csdn.net/m0_60472361/article/details/130583169