跳至正文
Wener Notes

IP

约 2 分钟阅读

TCP/IP

bash
# 获取 IP
curl checkip.amazonaws.com
curl ipinfo.io/ip
curl ifconfig.co
curl ipecho.net/plain
curl icanhazip.com
curl ipv4.icanhazip.com

curl 'https://vv.video.qq.com/checktime?otype=json&callback=onCheckTime'

# 使用 DNS 的方式获取
dig +short myip.opendns.com @resolver1.opendns.com


# Service
curl https://www.cloudflare.com/ips-v4
curl https://www.cloudflare.com/ips-v6
curl https://ip-ranges.amazonaws.com/ip-ranges.json

Private

| CIDR | Start | End | Count | Class | | --------------- | ----------- | --------------- | -------- | ----- | ---------- | | 0.0.0.0/8 | | 127.0.0.0/8 | | 10.0.0.0/8 | 10.0.0.0 | 10.255.255.255 | 16777216 | A | | 100.64.0.0/10 | 100.64.0.0 | 100.127.255.255 | | 169.254.0.0/16 | | 172.16.0.0/12 | 172.16.0.0 | 172.31.255.255 | 1048576 | B | | 192.0.0.0/24 | | 192.0.2.0/24 | | | | | TEST-NET-1 | | 192.168.0.0/16 | 192.168.0.0 | 192.168.255.255 | 65536 | B | | 192.88.99.0/24 | | 198.18.0.0/15 | | 198.51.100.0/24 | | | | | TEST-NET-2 | | 203.0.113.0/24 | | | | | TEST-NET-3 | | 224.0.0.0/3 | | 224.0.0.0/4 | | ::1/128 | | fc00::/7 | | fe80::/10 |

text
127.0.0.0/8,10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16
  • IPv4 Address Blocks Reserved for Documentation
    • TEST-NET
    • 文档建议 Block

Welknown Private

CIDRfor
10.42.0.0/16k3s cluster-cidr
10.43.0.0/16k3s service-cidr
10.244.0.0/16k0s cluster-cidr
10.96.0.0/12k0s service-cidr
10.96.0.10k0s dns
10.10.0.0openvpn
100.64.0.0/10tailscale
100.100.100.100tailscale dns

Tags

FAQ

IP-address ending with zero?

  • 现在来说是没问题的, 20 年前有隐性的子网约定, .0 代表网络, .255 代表广播, 许多硬件设备和软件规则有基于这样的假设, 现在都是以 CIDR 为标准, 因此 .0 和 .255 都是有效的地址
  • IP-address ending with zero?

Tools

apnic

www.apnic.net/about-apnic/corporate-documents/documents/resource-guidelines/rir-statistics-exchange-format

根据 apnic 发布的最新 IP 地址,分析电信、联通、移动等 IP 地址段

version|registry|serial|records|startdate|enddate|UTCoffset ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub11 条
Wikipedia2 条
Hacker News1 条
标准文档2 条
  • RFC 3330datatracker.ietf.org/doc/html/rfc3330
    RFC

    IETF Request for Comments standard document.

  • RFC 5737datatracker.ietf.org/doc/html/rfc5737
    RFC

    IETF Request for Comments standard document.

其他外链18 条
最近更新commit c6bc0d8编辑