IPサブネット計算機

IPサブネット計算機は、指定されたネットワークアドレス、サブネットマスク、およびIPアドレスに基づいてサブネット計算を実行します。CIDR変換、利用可能なホストIP範囲、ブロードキャストアドレス、ワイルドカードマスク、2進数表記を含むIPv4およびIPv6サブネット計算を完全サポートします。

IPv4サブネット計算機

IPv6サブネット計算機

IPv4の標準的なサブネット一覧:

プレフィックス サブネットマスク サブネットごとの利用可能ホスト数 総サブネット数
Class A
/8 255.0.0.0 16,777,214 1
/9 255.128.0.0 8,388,606 2
/10 255.192.0.0 4,194,302 4
/11 255.224.0.0 2,097,150 8
/12 255.240.0.0 1,048,574 16
/13 255.248.0.0 524,286 32
/14 255.252.0.0 262,142 64
/15 255.254.0.0 131,070 128
Class B
/16 255.255.0.0 65,534 1
/17 255.255.128.0 32,766 2
/18 255.255.192.0 16,382 4
/19 255.255.224.0 8,190 8
/20 255.255.240.0 4,094 16
/21 255.255.248.0 2,046 32
/22 255.255.252.0 1,022 64
/23 255.255.254.0 510 128
Class C
/24 255.255.255.0 254 1
/25 255.255.255.128 126 2
/26 255.255.255.192 62 4
/27 255.255.255.224 30 8
/28 255.255.255.240 14 16
/29 255.255.255.248 6 32
/30 255.255.255.252 2 64
/31 255.255.255.254 0 (2 for RFC 3021) 128
/32 255.255.255.255 1 256
サブネット&分数演算測定ソルバー

ネットワーク帯域幅の割り当て、サーバーラックのユニット間隔、サブブロックの分割比率では、厳密な分数計算が頻繁に必要となります。ステップごとの約分と小数変換を備え、帯分数や分数の加減乗除を瞬時に解決します。

一般的なプリセット:

完全版 IPv4 & IPv6サブネット化およびCIDR設計ガイド

サブネット化(サブネッティング)は、コンピュータネットワークにおいて大規模な物理または仮想ネットワークを、より小さく論理的に整理されたサブネットワークに分割するための基礎的な数学的技術です。IPアドレス空間を分割することで、ネットワーク設計者はアクセス制御の分離によるセキュリティ向上、ブロードキャストストームの抑制、遅延の削減、およびIPv4アドレスの最大限の節約を実現します。CIDRやビット単位のサブネットマスクの理解は、ネットワークエンジニアやクラウド設計者にとって必須の知識です。

1. IPv4サブネット化の数学的基礎

An IPv4 address consists of 32 binary bits arranged into four 8-bit bytes called octets, separated by periods (e.g., 192.168.1.1). Every IP address is fundamentally divided into two segments: the Network Prefix (which identifies the subnet) and the Host Identifier (which identifies the individual interface or host on that subnet). (which identifies the individual interface or host on that subnet).

  • Bitwise AND Operation: A router determines the network address by performing a logical bitwise AND between the 32-bit IP address and the 32-bit subnet mask. Wherever the mask bit is 1, the IP bit is preserved; wherever the mask bit is 0, the result is forced to 0.
  • Total Host Formula: If a subnet mask reserves h host bits (where h = 32 - CIDR), the total number of IP addresses in the subnet is 2^h.
  • Usable Host Formula: In standard IPv4 networking, two addresses are reserved and cannot be assigned to endpoints: the Network Address (where all host bits are binary 0) and the Broadcast Address (where all host bits are binary 1). Therefore, the number of usable hosts is 2^h - 2.
  • Point-to-Point /31 Subnets (RFC 3021): For direct router-to-router point-to-point serial links, RFC 3021 eliminates dedicated network and broadcast addresses, allowing both addresses in a /31 block to be assigned to the two peer router interfaces, conserving vast blocks of IPv4 space.

2. プライベートIP空間(RFC 1918)とパブリックルーティング

世界的な42.9億個のIPv4アドレスプールの枯渇を防ぐため、IETFはRFC 1918に基づき、パブリックインターネット上ではルーティングされない3つのプライベートIPv4ブロックを指定しました:

  • 10.0.0.0/8 (Class A Private): Range: 10.0.0.0 to 10.255.255.255 (16,777,216 total addresses). Ideal for large enterprise campus networks, global WANs, and cloud multi-tier VPC topologies.
  • 172.16.0.0/12 (Class B Private): Range: 172.16.0.0 to 172.31.255.255 (1,048,576 addresses across 16 contiguous /16 blocks). Frequently used in mid-sized enterprise networks, virtualization clusters, and Docker/Kubernetes container overlays.
  • 192.168.0.0/16 (Class C Private): Range: 192.168.0.0 to 192.168.255.255 (65,536 addresses across 256 contiguous /24 blocks). Standard default for home routers, small-office/home-office (SOHO) Wi-Fi networks, and lab benches.
  • 100.64.0.0/10 (Carrier-Grade NAT / CGNAT - RFC 6598): Range: 100.64.0.0 to 100.127.255.255 (4,194,304 addresses). Used by ISPs to aggregate multiple residential subscribers behind shared public IPv4 gateways.

3. IPv6アーキテクチャと必須の /64 プレフィックス

IPv6 replaces IPv4's 32-bit limitation with a massive 128-bit address space, representing 2^128 (approximately 340 undecillion) unique addresses. IPv6 addresses are written as eight groups of four hexadecimal digits (hextets) separated by colons. (approximately 340 undecillion) unique addresses. IPv6 addresses are written as eight groups of four hexadecimal digits (hextets) separated by colons.

  • Global Routing Prefix (Typically /48 to /56): Assigned by Regional Internet Registries (RIRs) and ISPs to enterprises and organizations.
  • Subnet Identifier (Bits 48 through 64): Gives an enterprise up to 65,536 distinct /64 subnets from a single /48 assignment.
  • Interface Identifier (Bits 64 through 128): RFC 4291 mandates that standard subnets use a /64 prefix to allow Stateless Address Autoconfiguration (SLAAC). Each individual /64 subnet contains 18,446,744,073,709,551,616 unique host addresses.

4. クラウドVPCサブネット設計(AWS、Azure、GCP)

AWS VPC、Microsoft Azure VNet、Google Cloud VPCなどの主要なクラウド環境でサブネットを設計する際、クラウドプロバイダーはインフラストラクチャサービス用に各サブネット内の追加IPアドレスを予約します:

  • .0: Network address.
  • .1: VPC router / default gateway address.
  • .2: DNS resolver service (Amazon Provided DNS or Azure DNS).
  • .3: Cloud internal management or broadcast emulation.
  • .255: Network broadcast address.

Consequently, in an AWS VPC, a /24 subnet provides 251 usable host IP addresses rather than the traditional on-premise count of 254. Keep this cloud reserve in mind when sizing subnets for Kubernetes node pools or elastic load balancer clusters.

よくある質問 (FAQ)

IPとCIDRからネットワークアドレスとブロードキャストアドレスを求めるには? ▾
IPアドレスとサブネットマスクの両方を32ビットの2進数整数に変換します。IPとマスクの間でビット単位のAND演算を行ってネットワークアドレスを取得します。次にサブネットマスクを反転してワイルドカードマスクを求め、ネットワークアドレスとワイルドカードマスクの間でビット単位のOR演算を行うことでブロードキャストアドレスを取得します。
なぜ /30 サブネットは2つの利用可能IPアドレスしか提供しないのですか? ▾
/30プレフィックスは 32 - 30 = 2 ホストビットを残します。アドレスの総数は 2^2 = 4 です。先頭アドレスがネットワーク識別子、末尾アドレスがブロードキャスト用に予約されているため、利用可能なホストアドレスは 4 - 2 = 2 個となり、拠点間WAN接続の標準として用いられます。
クラスフルアドレッシングとクラスレス(CIDR)の違いは何ですか? ▾
クラスフルアドレッシング(RFC 791)は、先頭オクテットに基づいてIPアドレスをクラスA(/8)、B(/16)、C(/24)に厳格に分類し、膨大なアドレスの浪費を招きました。CIDR(RFC 1519)はこの固定境界を撤廃し、任意のプレフィックス長(/1〜/32)のサブネットマスクと柔軟な経路集約を可能にしました。
Ciscoルーターの設定でワイルドカードマスクはどのように機能しますか? ▾
ワイルドカードマスクは、IPアドレスのどのビットが一致すべきか(ビットが0の箇所)と、どのビットが任意でよいか(ビットが1の箇所)をルーターに指示します。255.255.255.255からサブネットマスクを減算して算出されます。例えば /26 サブネット(マスク 255.255.255.192)の場合、ワイルドカードマスクは 0.0.0.63 となります。

最終レビュー: