7
头图

Everyone knows that to mail a letter to the correct recipient, you need to provide an accurate and precise address. This address needs to be accurate from the country and city to the zip code, street, and house number. Only then can the staff at the post office know where to send the letter.

The same is true on the Internet. Each device needs a unique "house number" to exchange data with other devices on the network. This "house number" is the IP address. During the connection establishment of the device, the IP address will be automatically or manually assigned to the networked device. The Internet Protocol (IP) plays an important role in the assignment process.

Internet Protocol addresses (also known as "IP addresses" or "IP" for short) are the foundation of the Internet. It is based on the Internet protocol and refers to the uniquely identifiable address of a device (such as a computer, Web server or printer, etc.) in an internal or external network. The IP address can specify the entire device group, or it can assign multiple addresses to a computer. At the same time, each IP address in the network can only be used once at any given time. Let's talk about the working principle of IP address in detail below.

Types of IPv4, IPv6 and IP

There are now two versions of IP addresses, IPv4 and IPv6.

IPv4 address

Most devices currently mainly use Internet Protocol version 4 (IPv4) addresses. It consists of 32-bit binary numbers, such as 11000000 10101000 10110010 00011111. In order to make this number easy to distinguish, the 32-bit binary number is usually expressed as a combination of four decimal numbers, the value of which ranges from 0 to 255, separated by dots. For example: 192.168.178.31.

In total, IPv4 can constitute about 4.3 billion different addresses. For the early global Internet devices, because all devices will not be used at the same time, and some devices are only used in private networks, the number of IP addresses appears to be sufficient. But now more and more everyday devices need to be connected to the Internet, especially with the emergence of the Internet of Things (IoT), a large part of the devices need to have their own IP addresses. The number of IPv4 addresses has been used up and cannot meet the demand for numbers.

IPv6 that has arrived

The IPv6 address has 128 bits, so it must be written as a 128-bit binary number. Because such numbers are too long and impractical, the 128-bits are compressed into 8 blocks of 16-bits in hexadecimal notation, and they are separated by colons:. For example, 0000:0000:0000:0000:0000:ffff:c0a8:b21f. The letters a to f are also used as hexadecimal digits. If we omit the zero at the beginning of each block and replace a series of consecutive 0000 blocks with two colons "::", the format can be further simplified. The above example can be abbreviated as :: FFFF: c0a8: b21f.

IP address

Apart from the difference between IPv4 and IPv6, IP addresses are also divided into dynamic IP addresses, static IP addresses, and "special purpose" IP addresses reserved for private networks.

Dynamic IP address

Dynamic IP addresses are most commonly used for daily online browsing. When a DSL (Digital Subscriber Line) customer uses its router to access the Internet, the Internet Service Provider (ISP) will assign it a random IP address in the address pool. The assigned IP will be deleted after each use, or be changed automatically at regular intervals (for example, once every 24 hours).

Because of this "reuse" of IP addresses, the scarcity of the IPv4 address space is effectively reduced, because enterprises can configure IP according to customer needs without having to consider buying more spares.

static IP address

Unless the owner takes the initiative to change it, the static IP address always remains the same. These IP addresses are often used for web servers, because websites must always be accessed at the same address. Static IP is also used in a private network (LAN) to communicate with a local printer or another computer in the home network. From the user's point of view, the biggest disadvantage of static IP addresses compared to dynamic addresses is that they are easier to track.

Reserved dedicated IP address

IANA (Internet Number Allocation Agency, an organization that coordinates global IP address allocation) reserves some addresses as private IP address space or other special purposes, and reserves approximately 14.5% of IPv4 address space. E.g:

  • The IPv4 address space 0.0.0.0 to 0.255.255.255 encapsulated in the CIDR address block 0.0.0.0/8 refers to the hosts of the network.
  • When you enter the IP address 127.0.0.1, you can communicate with the local host (localhost). This is necessary for testing new applications.
  • The IP address 255.255.255.255 is designated for broadcasting.
  • The address space 10.0.0.0-10.255.255.255, 172.16.0.0 -172.31.255.255 and 192.168.0.0-192.168.255.255 are reserved for private network use. For IPv6, the prefix fc00::/7 is designated as private.

These IPs will not be assigned by the Internet, so they will never be routed on the Internet. However, if you want to surf the Internet, the router will convert the private IP address into a valid IPv4 or IPv6 address suitable for the local network through network address translation (NAT). The network administrator can assign a dedicated IP address manually or automatically through a DHCP server.

How can I find my IP address?

Knowing the type of IP, where can I find our IP address?

Different operating systems use different methods to view the computer's local IP:

  • For Windows, enter the command "ipconfig" in the command prompt. You can open the command prompt line by pressing [Windows] + [R] keys and entering "cmd" in the pop-up box.
  • The local IP of the Mac system can be viewed as follows: System Settings> Network.
  • For Linux systems, enter "ifconfig" in the command line to view the local IP and other information.

IP address and data protection

Although IP addresses themselves do not contain any information, because they can be used to identify users, they will become the subject of debate among data privacy topics from time to time. So is the IP address related to user information?

First, according to the user's IP address, it can be linked to the corresponding Internet provider. For example, if the IP starts with 183.128 and 125.112, the address belongs to Zhejiang Telecom.

In addition, according to the distance between the user's IP and the next Internet dial-in node, its exact location can be determined to some extent. In rural areas, perhaps only an approximate area can be determined. But in urban areas, because a dial-in node can be found almost every few hundred meters here, the determined geographic location is much more accurate.

For some website administrators, the exposure of the website server IP to cause hacker attacks is also a headache. Therefore, it is extremely important to hide your IP in a reasonable way. There are several ways to hide your IP:

  • Set up a proxy server or configure a firewall.
  • Use the anti-defense IP service to map the real IP to the anti-defense IP for hiding.
  • It is also a good way to use CDN service to hide your web server IP.

通过 CDN 隐藏源站 IP

As a senior cloud service provider, Youpaiyun naturally has a complete protection method for website IP. CDN can speed up website access while protecting IP.

Recommended reading

[Vernacular Popular Science] CDN & Game Accelerator, are the two principles the same?

webpage appear pop-ups? That was hijacked!


云叔_又拍云
5.9k 声望4.6k 粉丝

又拍云是专注CDN、云存储、小程序开发方案、 短视频开发方案、DDoS高防等产品的国内知名企业级云服务商。