User IP, how many secrets are hidden in it?

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:

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 to encapsulated in the CIDR address block refers to the hosts of the network.
  • When you enter the IP address, you can communicate with the local host (localhost). This is necessary for testing new applications.
  • The IP address is designated for broadcasting.
  • The address space, - and 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!

-- 隐于云端,静闻天籁 --

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

5.8k 声望
4.6k 粉丝
0 条评论
二狗子的火锅店被隔壁老王 DDoS 攻击了

云叔_又拍云阅读 211

最好用的 python 库合集
🎈 分词 - jieba优秀的中文分词库,依靠中文词库,利用词库确定汉子之间关联的概率,形成分词结果 {代码...} 🎈 词云库 - wordcloud对数据中出现频率较高的 关键词 生成的一幅图像,予以视觉上的突出 {代码...} 🎈 ...

tiny极客11阅读 3.4k评论 2

疫情已过,2023 我的前端面试记录
顺利入职。把我最近找工作的心得记录下来。工作交接确定 lastday整理手头工作,相关对接人、交接人放文档中工作交接过渡阶段。做好被咨询者,该拉人拉人,该拉群拉群平时沟通顺畅的同事如果没有 WX 可以加一个属...

linong11阅读 1.1k

花了几个月时间把 MySQL 重新巩固了一遍,梳理了一篇几万字 “超硬核” 的保姆式学习教程!(持续更新中~)
MySQL 是最流行的关系型数据库管理系统,在 WEB 应用方面 MySQL 是最好的 RDBMS(Relational Database Management System:关系数据库管理系统)应用软件之一。

民工哥13阅读 1.9k

思否 CTO 祁宁:社区问答是激荡高级智慧的头脑风暴
在祁宁家里,有一套完整的赛车模拟器,他甚至还请人到国外代购了最新的 VR 设备。作为沉浸式赛车游戏发烧友,除了享受速度与激情带来的愉悦感,祁宁在玩的过程中更多的是思考如何将技术能力进行产品化的问题。

万事ONES6阅读 12.9k评论 1


王中阳Go4阅读 1.9k评论 1

当时,随着移动互联网大潮的涌起,七牛云的图片、音视频存储业务获得迅猛发展,主要目标客户是各式各样的移动应用 App。面对层出不穷的 App,七牛云的销售人员希望精挑细选,从而挖掘到更有价值的客户。于是,他...

万事ONES3阅读 12.7k评论 1


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

5.8k 声望
4.6k 粉丝