Network Subnet Masking & CIDR Notation

💡 Network Subnet Masking & CIDR Notation — Executive Summary

Technical architectural analysis, practical configuration manifests, and deployment instructions for Network Subnet Masking & CIDR Notation.

References and Guidelines (NOTE)

CIDR (Classless Inter-Domain Routing) and subnet mask are similar concepts, but they are not exactly the same thing. Subnet Mask is a 32-bit (IPv4) or 128-bit (IPv6) value used to distinguish between the network and host parts. On the other hand, CIDR notation is a way to express an IP address range by adding a slash (/) followed by the network bit number.

For example:

  • Subnet mask notation: 255.255.255.0
  • CIDR notation: 192.168.1.0/24

Both expressions serve the purpose of distinguishing between the network and host parts, but CIDR provides a more flexible method of network scoping, which can reduce IP address waste.

IPv4 CIDR
References and Guidelines (NOTE)

In many systems, x.x.x.255 == broadcast IP is automatically assigned. In other words, it is safe.

bit (CIDR) subnet mask Cisco mask hosts usable hosts Class
/4 240.0.0.0 15.255.255.255 268435456 268435454
/5 248.0.0.0 7.255.255.255 134217728 134217726
/6 252.0.0.0 3.255.255.255 67108864 67108862
/7 254.0.0.0 1.255.255.255 33554432 33554430
/8 255.0.0.0 0.255.255.255 16777216 16777214 A Class
/9 255.128.0.0 0.127.255.255 8388608 8388606
/10 255.192.0.0 0.63.255.255 4194304 4194302
/11 255.224.0.0 0.31.255.255 2097152 2097150
/12 255.240.0.0 0.15.255.255 1048576 1048574
/13 255.248.0.0 0.7.255.255 524288 524286
/14 255.252.0.0 0.3.255.255 262144 262142
/15 255.254.0.0 0.1.255.255 131072 131070
/16 255.255.0.0 0.0.255.255 65536 65534 B Class
/17 255.255.128.0 0.0.127.255 32768 32766
/18 255.255.192.0 0.0.63.255 16384 16382
/19 255.255.224.0 0.0.31.255 8192 8190
/20 255.255.240.0 0.0.15.255 4096 4094
/21 255.255.248.0 0.0.7.255 2048 2046
/22 255.255.252.0 0.0.3.255 1024 1022
/23 255.255.254.0 0.0.1.255 512 510
/24 255.255.255.0 0.0.0.255 256 254 C Class
/25 255.255.255.128 0.0.0.127 128 126
/26 255.255.255.192 0.0.0.63 64 62
/27 255.255.255.224 0.0.0.31 32 30
/28 255.255.255.240 0.0.0.15 16 14
/29 255.255.255.248 0.0.0.7 8 6
/30 255.255.255.252 0.0.0.3 4 2
 /31 point to point links only
 /32 255.255.255.255  use host notice 1 1
IPv6 CIDR

In IPv6, the method of allocating subnets and network size is very different from IPv4. Typically, the /64 subnet is used as a standard, which allows 2\^64 host addresses. Below is a table showing the major subnet notations and number of hosts in IPv6. In IPv6, CIDR notation is used rather than the concept of a subnet mask, and there is no direct correspondence between netmask and Cisco mask like in IPv4.

bit (CIDR) hosts usable hosts Notes
/32 2\^96 (about 7.9 x 10\^28) 2\^96 – 2 (about 7.9 x 10\^28) Large ISP allocation
/48 2\^80 (about 1.2 x 10\^24) 2\^80 – 2 (approximately 1.2 x 10\^24) General corporate/institution allocation
/56 2\^72 (about 4.7 x 10\^21) 2\^72 – 2 (approximately 4.7 x 10\^21) Small Business Assignment
/64 2\^64 (about 1.8 x 10\^19) 2\^64 – 2 (approximately 1.8 x 10\^19) Typical IPv6 subnet sizes
/96 2\^32 (about 4.2 x 10\^9) 2\^32 – 2 (approximately 4.2 x 10\^9) special purpose subnet
/127 2 2 point-to-point links
/128 1 1 single IP address
Key points
  • /64: Most IPv6 subnets are assigned /64. It can provide addresses to countless individual devices on a single network.
  • /127: Used for point-to-point links in IPv6, only two hosts are connected.
  • /128: Used to assign a specific IP address to a single device or host.

In IPv6, instead of using various subnet sizes to differentiate networks like IPv4, most subnets are set to /64 to maintain consistency in address allocation.

International standard special band

Official name (English/Korean) Supporting Document CIDR notation range Remarks
Private Address Space
[RFC 1918](https://www.rfc-editor.org/rfc/rfc1918.html) 10.0.X.X/8 10.0.X.X \~ 10.255.255.255 Large private network
(Class A)
Private Address Space
[RFC 1918](https://www.rfc-editor.org/rfc/rfc1918.html) 172.16.0.0/12 172.16.0.0 \~ 172.31.255.255 172.16.0.0/16 \~
172.31.0.0/16
(Class B \* 16)
Private Address Space
[RFC 1918](https://www.rfc-editor.org/rfc/rfc1918.html) 192.168.0.0/16 192.168.0.0 \~ 192.168.255.255 192.168.0.0/24 \~
192.168.255.0/24
(Class C \* 256)
Shared Address Space
[RFC 6598](https://www.rfc-editor.org/rfc/rfc6598.html) 100.64.0.0/10 100.64.0.0 \~ 100.127.255.255 For telecommunication company CGNAT
Link-Local Address
(Link-Local Address)
[RFC 3927](https://www.rfc-editor.org/rfc/rfc3927.html) 169.254.0.0/16 169.254.0.0 \~ 169.254.255.255 APIPA
(automatically assigned address)
Loopback Address
(Loopback address)
[RFC 1122](https://www.rfc-editor.org/rfc/rfc1122.html) 127.0.0.0/8 127.0.0.0 \~ 127.255.255.255 For host internal communication
L3 allocation rules
References and Guidelines (NOTE)

For convenience, described as /24. Even if the netmask is changed, the first and last addresses cannot be used.

1. “Absolutely reserved addresses” that cannot be used as hosts (2)

The start and end addresses of any subnet cannot be assigned to devices (PCs, servers, etc.).

  • Network Address: First address of the band (e.g. 192.168.0.0)
  • Purpose: A name tag that represents the network itself. When the router finds a route, it looks at this address and decides, “Oh, I can send this packet to the 192.168.0 point neighborhood.”
  • Broadcast Address: Last address of the band (e.g. 192.168.0.255)
  • Purpose: Used to send data to all devices at once belonging to the network. If you send a packet to this address, all PCs in the network will receive its contents.
2. Customarily used address (Gateway)

Technically, assignment is possible, but for management efficiency, these addresses are left blank as a promise.

  • Default Gateway: Usually .1 or .254
  • Purpose: This is the address of the router or router that is the ‘entrance’ to the external Internet.
  • Features: Although not established by law, it is a strong commitment among network engineers. Usually the first address (.1) is used the most, followed by the last available address (.254).
  • Server and Fixed Equipment Band: Mainly .2 to .10
  • For management convenience, the numbers right behind the gateway are often statically assigned to major infrastructure equipment such as DNS servers, firewalls, and NAS.
3. Exception rules: /32, /31
  • /32: In case there is only one address. It is mainly used when setting the Loopback IP of the device. At this time, the network/broadcast distinction is meaningless, so the device uses the address itself.
  • /31: Used to reduce IP waste in connections between modern router devices. (RFC 3021) Only in this case, as an exception, both IPs are assigned to the device without a network/broadcast address. However, it is never used in a typical PC or switch environment.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *