CodeToolProCodeToolPro
GitHub

IPv6 ULA Generator

Generate ULA

  • Generates RFC 4193 Unique Local IPv6 Addresses (fd00::/8 prefix).
    ULA Format: fd + 40-bit Global ID + 16-bit Subnet ID + 64-bit Interface ID
    Total: 128 bits
    Prefix: fd00::/8

    技术详情

    IPv6 ULA 生成器的工作原理

    工具功能

    IPv6 ULA(Unique Local Address)生成器可生成符合 RFC 4193 规范的私有 IPv6 地址段。ULA 是 IPv6 的局域网专用地址,类似于 IPv4 中的 RFC 1918 私有地址(10.0.0.0/8、172.16.0.0/12、192.168.0.0/16)。ULA 地址位于 fc00::/7 范围,具有全球唯一性(通过随机生成的 40 位全局 ID 确保)但在公网上不路由。


    常见开发者使用场景

    ULA 地址主要用于企业内部网络:在大型企业或数据中心内部署内部 IPv6 网络时使用 ULA 避免与公网地址冲突、构建点对点 VPN 隧道时分配 ULA 作为内部端点地址、在 Kubernetes 集群内部使用 ULA 替代 IPv4 私有地址以实现更简洁的寻址方案、以及在开发/测试环境中模拟 IPv6 网络架构。

    与 IPv6 相关操作可结合 IPv6 解析器 进行地址验证。CIDR 计算器 可用于 ULA 子网划分。IPv4 范围计算器 提供了 IPv4 对应的私有地址段管理。


    技术原理/相关概念

    ULA 地址定义为 fc00::/7 前缀,实际使用的是 fd00::/8(fc00::/8 保留用于未来标准化)。地址结构:fd + 40 位随机全局 ID + 16 位子网 ID + 64 位接口 ID。40 位随机全局 ID 使用伪随机数生成,使得不同组织生成的 ULA 即使合并网络也极不可能冲突。ULA 地址不以任何方式与公网关联,不需要向 IANA 注册。


    常见陷阱与注意事项

    • 与 IPv4 私有地址类比:ULA 不能直接替换 IPv4 的 192.168.x.x。IPv6 中每个子网默认有 /64,意味着有巨大的地址空间可用。
    • 正确使用 fd00::/8:RFC 规定 ULA 应在 fd00::/8 范围内(即首字节为 fd),而非 fc00::/8(后者保留用于未来标准)。
    • NAT 避免:IPv6 设计哲学不推荐 NAT。ULA 地址内部可直接路由,不需 NAT66。只有需要访问公网时才需要代理。
    • DNS 解析:ULA 地址的 DNS 记录只在内部 DNS 服务器中存在,避免泄露到公网 DNS。

    何时使用此工具而非代码

    在网络规划设计、企业内部 IPv6 部署或测试环境创建时使用此工具。适合网络工程师和系统架构师的规划阶段。对于自动化为多个站点或服务分配 ULA 的场景,推荐使用编程语言的 IPv6 地址生成库(如 Python 的 ipaddress.IPv6Network、Go 的 net.IP)编写配置管理脚本。

    How to Use IPv6 ULA Generator

    1. 1Configure your generation settings (length, format, options)
    2. 2Click the Generate button to create new output
    3. 3Review the generated result
    4. 4Copy the output to your clipboard or download it

    Frequently Asked Questions

    • Can I use the generated output in production?

      Yes, all generated values are cryptographically random (where applicable) and ready for production use. No special attribution required.

    • Is IPv6 ULA Generator free?

      Yes, 100% free. No registration, no credit card required. All tools are freely available for developers worldwide.

    • Does this tool upload my data to any server?

      No. All processing runs locally in your browser using client-side JavaScript. Your input data, code, or files never leave your device. We do not store, log, or transmit any user data.