Skip to main content

TCP/IP

# 获取 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

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 |

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
  • rfc5737 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

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

https://github.com/DanielPLSH/apnic 根据 apnic 发布的最新 IP 地址,分析电信、联通、移动等 IP 地址段

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