跳到正文
ipaddress.co.nz

IP 地址校验

粘贴一个地址或前缀。我们会检查语法、进行规范化并分类。

有效IPv4 地址
规范化形式
100.64.12.7
分类
私有 · 共享地址空间(CGNAT)
特殊用途地址段
100.64.0.0/10
参考
Shared Address Space (CGNAT) · RFC 6598
全球可达
否

此内容尚无中文版本。在发布译文之前以英语显示。

An address can look right and still be wrong: 192.168.1.256 has a number above 255, 2001:db8::1::2 uses :: twice, and 192.168.01.1 has a leading zero that some systems read as octal. The validator checks the syntax the same way this site’s own parser does and tells you exactly what is wrong.

A valid address is shown in its normalised form — for IPv6 the canonical compressed form from RFC 5952 — and classified against IANA’s special-purpose registries: private, loopback, link-local, shared CGNAT space (100.64.0.0/10), documentation ranges and so on. A CIDR block is reduced to its network address.

常见问题

Is 100.64.x.x a private address?

Not in the RFC 1918 sense, but it isn't public either: 100.64.0.0/10 is shared address space for carrier-grade NAT (RFC 6598). If your router's WAN address is in it, your provider uses CGNAT.

Why is a leading zero rejected?

Some software reads 010 as octal (8), other software as decimal (10). Because the same text can mean two different addresses, modern parsers refuse it.

Can I paste an address with a port?

The validator recognises forms like 192.0.2.1:443 and [2001:db8::1]:443 and tells you to remove the port, since a port is not part of an IP address.