サブネットマスク

IPアドレッシング

定義

IPアドレスをネットワーク部分とホスト部分に分割する32ビットの数値(例:255.255.255.0)。アドレスのどの部分がネットワークを識別し、どの部分が個々のデバイスを識別するかを決定する。

Anatomy of a Subnet Mask

A subnet mask is a 32-bit value with all network bits set to 1 and all host bits set to 0. The mask 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — 24 ones followed by 8 zeros, written in CIDRClassless Inter-Domain Routing. A method of allocating IP addresses using variable-length subnet masking (e.g., 10.0.0.0/8) instead of fixed classful boundaries, enabling more efficient use of the IPv4 address space. notation as /24. Applying this mask to the address 192.168.10.50 via bitwise AND yields the network address 192.168.10.0, while the remaining bits identify host 50 within that network.

The mask performs one essential function: telling a device whether a destination address is on the local network (send directly via ARP) or on a remote network (send to the default gateway). This local/remote determination happens for every outbound packet.

Subnetting and VLSM

Variable-Length Subnet Masking (VLSM) — enabled by CIDRClassless Inter-Domain Routing. A method of allocating IP addresses using variable-length subnet masking (e.g., 10.0.0.0/8) instead of fixed classful boundaries, enabling more efficient use of the IPv4 address space. — allows different parts of an address space to use different mask lengths. A /24 might be divided into four /26 subnets (64 addresses each), or two /25s and four /27s. This flexibility allows network designers to match subnet size to actual device count, minimizing address waste.

Common subnet sizes and their masks:

CIDR Mask Usable Hosts
/30 255.255.255.252 2
/28 255.255.255.240 14
/24 255.255.255.0 254
/22 255.255.252.0 1,022
/16 255.255.0.0 65,534

Subnet Masks in Modern Networks

IPv6Internet Protocol version 6. The successor to IPv4 using 128-bit addresses (e.g., 2001:0db8::1), providing a virtually unlimited address space of 3.4 x 10^38 addresses. Designed to solve IPv4 address exhaustion. does not use subnet masks — it uses prefix lengths exclusively (e.g., /64). The /64 boundary is standard for IPv6 LAN segments, as SLAAC and EUI-64 depend on the host portion being exactly 64 bits.

Use Subnet Calculator to compute network addresses, broadcast addresses, and host ranges for any subnet mask and IP combination.

関連用語

IPアドレッシングの関連項目