Home > Common Problem > What type of special address does 127.0.0.1 belong to?

What type of special address does 127.0.0.1 belong to?

藏色散人
Release: 2021-12-07 11:46:06
Original
22026 people have browsed it

127.0.0.1 is a loopback address, which refers to the local machine and is generally used for testing; the loopback address is the loopback address of the local machine, which is the IP address inside the host IP stack. It is mainly used for network software testing and local machine processes. For inter-communication, no matter what program, once the loopback address is used to send data, the protocol software returns immediately without any network transmission.

What type of special address does 127.0.0.1 belong to?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

Which type of special address does 127.0.0.1 belong to?

127.0.0.1 is the loopback address, which refers to the local machine and is generally used for testing. The loopback address (127.x.x.x) is the local loopback address (Loopback Address), which is the IP address inside the host IP stack. It is mainly used for network software testing and local machine inter-process communication. No matter what program, once the loopback address is used to send data, The protocol software returns immediately without any network transmission.

Special Address

The IP address consists of two parts, the network address and the host address. The network address indicates which network on the Internet it belongs to, and the host address indicates which host in the network it belongs to. The two are in a master-slave relationship. The four major types of IP addresses identify a certain host on the network. The IPv4 address length is 32 bits and 4 bytes in total, but in practice we use dotted decimal notation.

IP addresses are divided according to the network number and host number, and are divided into three categories: A, B, C and special addresses D and E. Leave all 0s and all 1s unused.

Class A: The first byte is the network number, and the last three bytes are the host number. The beginning of this type of IP address is "0", so the network number of the address ranges from 1 to 126. Generally used in large networks.

Class B: The first two bytes are the network number, and the last two bytes are the host number. The first part of this type of IP address is "10", so the network number of the address ranges from 128 to 191. Generally used for medium-sized networks.

Category C: The first three bytes are the network number, and the last byte is the host number. The beginning of this type of IP address is "110", so the network number of the address ranges from 192 to 223. Generally used for small networks.

Class D: It is a multicast address. The beginning of this type of IP address is "1110", so the network number of the address ranges from 224 to 239. Generally used for multicast users [1].

Class E: is a reserved address. The beginning of this type of IP address is "1111", so the network number of the address ranges from 240 to 255.

Return address: 127.0.0.1. Generally used for testing. For example: ping 127.0.0.1 to test whether the local TCP/IP is normal.

In the regulations of classful IP addresses, the first part is 1~126 for class A addresses, and 128~191 for class B addresses. Then the 127.0.0.1 left in the middle is called the local loopback address, and its main function is There are two: one is to test the network configuration of the machine. If it can PING 127.0.0.1, it means that there is no problem with the network card and IP protocol installation of the machine; the other is that some SERVER/CLIENT applications need to call the server when running. For resources on the computer, you generally need to specify the IP address of the SERVER. However, when the program is to be run on the same machine and there is no other SERVER, you can install the SERVER resources on the local machine and set the SERVER IP address to 127.0.0.1. The same can be run.

What type of special address does 127.0.0.1 belong to?

Enter 127.0.0.1

in the IE browser. For most people who are accustomed to using localhost, it essentially points to the local IP address 127.0.0.1 . There is a configuration file in the operating system (the path in windows is C:\WINDOWS\system32\drivers\etc\hosts, the path in Unix/Linux is /etc/hosts) that binds localhost to 127.0.0.1.

127.0.0.1 is commonly used by website builders.

We often use the "ping 127.0.0.1" command to do loop testing on this machine to verify whether the TCP/IP protocol cluster of this machine is correctly installed. But have you discovered it? You can also get the same test results by using the "ping 127.1" command. In fact, the two commands "ping 127.1" and "ping 127.0.0.1" are the same, and they are both performing loop tests.

What type of special address does 127.0.0.1 belong to?

ping 127.0.0.1

Why is this happening? This is the technique for using IP addresses in the Ping command application. As we all know, an IP address consists of 32 binary digits. In order to facilitate everyone's memory, every 8 binary digits are converted into decimal digits, thus forming an easy-to-remember IP address consisting of four decimal digits (such as 127.0.0.1 ). Since the Windows operating system has the function of automatically filling in ".0", I can change "127.0.0.1" to "127.1".

However, the omission of ".0" is conditional and cannot be omitted arbitrarily. In the application of the Ping command, you can only omit one or more ".0" appearing before the last part of the decimal digit of the IP address, for example, rewrite the "ping 127.0.0.1" command as "ping 127.1".

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What type of special address does 127.0.0.1 belong to?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template