NetCalcLab

/30 Subnet Mask — 255.255.255.252

Everything about the /30 prefix: the subnet mask 255.255.255.252, wildcard mask 0.0.0.3, 4 addresses with 2 usable hosts, and how the block is laid out in practice.

Accepts /24, a bare 24, a dotted subnet mask such as 255.255.255.0, or a wildcard mask such as 0.0.0.255.

Examples:

Complete CIDR reference table

Every valid IPv4 prefix from /0 to /32 with its mask, wildcard and address counts.

CIDR to subnet mask reference table
PrefixSubnet maskWildcardTotal addressesUsable hostsBlock size
/00.0.0.0255.255.255.2554,294,967,2964,294,967,2944,294,967,296
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,6462,147,483,648
/2192.0.0.063.255.255.2551,073,741,8241,073,741,8221,073,741,824
/3224.0.0.031.255.255.255536,870,912536,870,910536,870,912
/4240.0.0.015.255.255.255268,435,456268,435,454268,435,456
/5248.0.0.07.255.255.255134,217,728134,217,726134,217,728
/6252.0.0.03.255.255.25567,108,86467,108,86267,108,864
/7254.0.0.01.255.255.25533,554,43233,554,43033,554,432
/8255.0.0.00.255.255.25516,777,21616,777,21416,777,216
/9255.128.0.00.127.255.2558,388,6088,388,6068,388,608
/10255.192.0.00.63.255.2554,194,3044,194,3024,194,304
/11255.224.0.00.31.255.2552,097,1522,097,1502,097,152
/12255.240.0.00.15.255.2551,048,5761,048,5741,048,576
/13255.248.0.00.7.255.255524,288524,286524,288
/14255.252.0.00.3.255.255262,144262,142262,144
/15255.254.0.00.1.255.255131,072131,070131,072
/16255.255.0.00.0.255.25565,53665,53465,536
/17255.255.128.00.0.127.25532,76832,76632,768
/18255.255.192.00.0.63.25516,38416,38216,384
/19255.255.224.00.0.31.2558,1928,1908,192
/20255.255.240.00.0.15.2554,0964,0944,096
/21255.255.248.00.0.7.2552,0482,0462,048
/22255.255.252.00.0.3.2551,0241,0221,024
/23255.255.254.00.0.1.255512510512
/24255.255.255.00.0.0.255256254256
/25255.255.255.1280.0.0.127128126128
/26255.255.255.1920.0.0.63646264
/27255.255.255.2240.0.0.31323032
/28255.255.255.2400.0.0.15161416
/29255.255.255.2480.0.0.7868
/30255.255.255.2520.0.0.3424
/31255.255.255.2540.0.0.122 (RFC 3021)2
/32255.255.255.2550.0.0.0111

Quick reference: mask to prefix

Reading a mask written in dotted-decimal form. Count the 1 bits, or use the octet boundaries below.

Subnet mask to CIDR prefix lookup
Subnet maskPrefixWildcardUsable hostsBlock size
255.255.255.128/250.0.0.128126128
255.255.255.192/260.0.0.646264
255.255.255.224/270.0.0.323032
255.255.255.240/280.0.0.161416
255.255.255.248/290.0.0.868
255.255.255.252/300.0.0.424
255.255.255.254/310.0.0.202
255.255.255.255/320.0.0.101

Example: 255.255.255.224 has three 1 bits in its last octet, so the prefix is 24 + 3 = /27, the wildcard is 0.0.0.31 and there are 32 addresses of which 30 are usable.

What a /30 means

The number after the slash counts the network bits, so a /30 has 30 network bits and 2 host bits. Those 2 bits are what produce the address count: 2^2 = 4 addresses in the block.

/30 in four notations
Prefix        /30
Subnet mask   255.255.255.252
Wildcard      0.0.0.3
Binary mask   11111111.11111111.11111111.11111100
Host bits     2

The classic point-to-point WAN link, 2 usable hosts.

A worked /30 block

Taking 192.168.1.0 as the starting point and applying the /30 mask gives the boundaries below. The network address is the base with every host bit cleared, and the broadcast address is the base with every host bit set — which is why they are always the first and last addresses in the block.

192.168.1.0/30

Network address   192.168.1.0
First host 192.168.1.1 Last host 192.168.1.2
Broadcast 192.168.1.3
Usable hosts 2 of 4 addresses

Consecutive /30 blocks start every 4 addresses — that spacing is the block size, and it is the same number as the address count. A /30 block that does not begin on a multiple of 4 overlaps its neighbour, which is the most common subnetting error in a hand-written address plan.

Sizing a /30

To decide whether a /30 fits a requirement, compare the usable host count against the number of devices you need to address, then add spare capacity.

Capacity and fit for a /30
MeasureValueWhat it means
Network bits30Fixed portion identifying the subnet
Host bits2Bits available for device addresses
Total addresses4The size of the block
Usable hosts2Excludes the network and broadcast address
Block size4Spacing between consecutive subnets

Common mistakes

  • Forgetting the two reserved addresses. A /30 has 4 addresses but only 2 assignable to devices. Sizing a subnet at exactly 2 hosts of requirement leaves nothing for the network and broadcast address.
  • Writing the mask wrong. There is exactly one valid mask for a /30: 255.255.255.252. Anything else is a different prefix and will silently create a different network.
  • Using the wildcard as the mask. 0.0.0.3 is the wildcard for a /30, not the mask. In a Cisco ACL the wildcard convention is inverted, so the two get swapped constantly.
  • Starting the subnet off its boundary. A /30 must start on a multiple of 4. Starting anywhere else overlaps neighbouring subnets and produces routing loops or unreachable ranges.
  • Assuming a /30 is the right size for every case. Check the host requirement first — the CIDR calculator has a host-to-prefix cheat sheet, and the subnet calculator shows the full breakdown for any address.

Other prefixes

Jump to another prefix, or see the complete table with all 33 values.

Neighbouring prefixes compared

/30 compared with the prefixes either side of it
PrefixMaskHostsBlock sizeRelationship
/28255.255.255.2401416A further halving or doubling
/29255.255.255.24868Half the hosts — one bit borrowed
/30255.255.255.25224This page
/31255.255.255.25422Double the hosts — one bit returned
/32255.255.255.25511A further halving or doubling

Every step to a shorter prefix doubles the address count, and every step to a longer prefix halves it. That single rule explains the whole table.

Related: CIDR calculator, subnet calculator, VLSM planner, CIDR notation explained, subnetting guide.

IP to Binary Converter · Binary to IP Converter · IP to Hex Converter · Hex to IP Converter · IP to Decimal Converter ·

Frequently asked questions

What is the subnet mask for a /30?

The subnet mask for a /30 is 255.255.255.252. It is 30 consecutive 1 bits followed by 2 0 bits, which is what makes the host portion of the address 2 bits wide. The corresponding wildcard mask is 0.0.0.3, which is the bitwise inverse and is what you would use in a Cisco ACL or an OSPF network statement.

How many addresses are in a /30?

A /30 contains 2^2 = 4 addresses. That follows directly from the host bit count: a /30 leaves 2 bits for the host portion, and each bit doubles the count. Every step to a longer prefix halves this number, and every step to a shorter prefix doubles it.

How many usable hosts does a /30 have?

A /30 has 2 usable host addresses out of 4 total. The two that are not assignable are the network address, which has all 2 host bits set to 0, and the broadcast address, which has all 2 host bits set to 1. That is why the usable count is always exactly two less than the total.

What is the block size of a /30?

The block size is 4, the same as the address count. Consecutive /30 subnets therefore start every 4 addresses. A /30 that does not begin on a multiple of 4 overlaps its neighbours, which causes addresses to be unreachable or routed to the wrong place.

How do I split a /30 into smaller subnets?

A /30 is already at or near the smallest practical size. It cannot be divided further without producing subnets that have no usable host addresses, so if you need more segments you should start from a shorter prefix.

Is a /30 a private or public subnet?

The prefix length says nothing about whether an address is private or public — that is determined by the address range, not the mask. A 192.168.1.0/24 is private because it sits inside the RFC 1918 block 192.168.0.0/16, while 203.0.113.0/24 is documentation space and 8.8.8.0/24 is public. Use the subnet calculator with any address in the block to see its classification.