# Which 2 class A/B/C ip addresses are excluded?

**URL:** <https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966>\
**Category:** Factual Questions\
**Created:** [June 14, 2013, 3:30am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966 "2013-06-14T03:30:12Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnClay](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@JohnClay](https://boards.straightdope.com/u/JohnClay)\
**Post date:** [June 14, 2013, 3:30am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/1 "2013-06-14T03:30:12Z")

</div>

> **[Subnet Masks Reference Table](https://www.cloudaccess.net/infrastructure-networking/67-ip-addresses/322-subnet-masks-reference-table.html)**
>
> Subnetting is the process of dividing one network into smaller networks.

For class A B and C the “Number of Hosts” is always 2 less than 2^X… which two addresses are excluded?

e.g. one where all of the bits are zero and one where all of the bits are 1? I’m just guessing but I can’t see it confirmed anywhere…

and also I’m wondering what those 2 reserved addresses are used for…

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [June 14, 2013, 4:10am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/2 "2013-06-14T04:10:11Z")

</div>

2^X-2 because 255 is a [broadcast address](http://en.wikipedia.org/wiki/Broadcast_address), but I dunno what that means.

The other missing value is just the 0, because when you have an 8-bit octet for each part of an IPv4 address, the possible values in binary range from 00000000 to 11111111. 11111111 gets you the 255 in decimal, and 00000000 is 0. In between those two are 254 other possibilities.

ETA: [netmask - Why can't all zeros in the host portion of IP address be used for a host? - Server Fault](http://serverfault.com/questions/451238/why-cant-all-zeros-in-the-host-portion-of-ip-address-be-used-for-a-host)

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2013, 4:17am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/3 "2013-06-14T04:17:02Z")

</div>

The 32-bit IP address consists of a _network portion_ which may be 8, 16, or 24 bits (that is, 1, 2, or 3 bytes, which are always called octets in this business). The remaining octets specify a _host address_ which is an individual machine in that network.

The host address portion cannot be all-1-bits because that is the _broadcast address._ That means, any packet so addressed is meant to be received by _all_ of the hosts in that particular network.

The host address portion also cannot be all-0-bits. That address generally refers to the particular network as a whole. (But that’s not used for broadcasts, though.)

---

<div class="post-metadata">

**Author:** ![JohnClay](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@JohnClay](https://boards.straightdope.com/u/JohnClay)\
**Post date:** [June 14, 2013, 5:38am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/4 "2013-06-14T05:38:17Z")

</div>

thanks!

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 14, 2013, 10:20am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/5 "2013-06-14T10:20:10Z")

</div>

Worth noting that this also applies if you subnet a network (i.e use a subnet other than 8, 16, or 24) - you still have a _subnet zero_ and a _subnet all-ones_, they just don’t always have a 0 or 255 final octet.

So if you have a /26 subnetting scheme, you get 4 subnets with  
subnet 1 (00) xx.xx.xx.0 (subnet 1 zero)  
subnet 1 (00) xx.xx.xx.63 (subnet 1 all-ones, broadcast)  
subnet 2 (01) xx.xx.xx.64 (subnet 2 zero)  
subnet 2 (01) xx.xx.xx.127 (subnet 2 all-ones, broadcast)  
subnet 3 (10) xx.xx.xx.128 (subnet 3 zero)  
subnet 3 (10) xx.xx.xx.191 (subnet 3 all-ones, broadcast)  
subnet 4 (11) xx.xx.xx.192 (subnet 4 zero)  
subnet 4 (11) xx.xx.xx.255 (subnet 4 all-ones, broadcast)

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [June 14, 2013, 10:31am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/6 "2013-06-14T10:31:30Z")

</div>

Yes, the way I see it, the old system of classes A, B, and C, in which the length of the network portion of the address could be deduced purely from the first few bits of the 32-bit IP address, is obsolete. These days, the network portion can be any length, which is specified by a separate parameter, usually notated with the slash suffix as **si\_blakely** did. When I’m dealing with network people I don’t here them talk about Class C and so on. It’s always “slash 24”, “slash 28” etc.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [June 14, 2013, 12:08pm UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/7 "2013-06-14T12:08:59Z")

</div>

In the /24, /26, /28, do the numbers represent anything with their value? Or did someone just enumerate different schemes?

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [June 14, 2013, 12:36pm UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/8 "2013-06-14T12:36:32Z")

</div>

The mean that the first 24, 26, or 28 bits, respectively, of the IP address is the network prefix.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [June 14, 2013, 12:46pm UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/9 "2013-06-14T12:46:00Z")

</div>

> [@Ximenean](#):
>
> Yes, the way I see it, the old system of classes A, B, and C, in which the length of the network portion of the address could be deduced purely from the first few bits of the 32-bit IP address, is obsolete. These days, the network portion can be any length, which is specified by a separate parameter, usually notated with the slash suffix as **si\_blakely** did. When I’m dealing with network people I don’t here them talk about Class C and so on. It’s always “slash 24”, “slash 28” etc.

The new system (which is not that new) is called [CIDR](http://en.wikipedia.org/wiki/CIDR) (pronounced “cedar,” for classless interdomain routing.) The old classful system is still taught for historical perspective, but is largely obsolete.

---

<div class="post-metadata">

**Author:** ![md2000](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@md2000](https://boards.straightdope.com/u/md2000)\
**Post date:** [June 14, 2013, 1:57pm UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/10 "2013-06-14T13:57:44Z")

</div>

The host portion of the address cannot be 0.

All zeroes in the host address is shorthand for “the network”, i.e. often used “network only.”

192.168.0.0 / 24 (meaning netmask 255.255.255.0); I’m not sure what stops 0 from being a host address, but by convention it is not allowed. The hosts are 00000001 to 11111110.

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [June 14, 2013, 9:41pm UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/11 "2013-06-14T21:41:05Z")

</div>

So I’ve been pronouncing it “cider” all these years (in my head, that is; I don’t think it has come up in conversation).

---

<div class="post-metadata">

**Author:** ![dstarfire](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dstarfire/32/5762_2.png) [@dstarfire](https://boards.straightdope.com/u/dstarfire)\
**Post date:** [June 15, 2013, 3:22am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/12 "2013-06-15T03:22:18Z")

</div>

Cisco routers can be configured to allow all 0’s or all 1’s in the subnet portion of an address. This is especially useful when you’ve got large subnets or very few bits to spare for the subnet portion of an address.

---

<div class="post-metadata">

**Author:** ![MaxTheVool](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@MaxTheVool](https://boards.straightdope.com/u/MaxTheVool)\
**Post date:** [June 15, 2013, 5:01am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/13 "2013-06-15T05:01:56Z")

</div>

Tangentially related question: many years ago I saw what I believe was an early XKCD which was a map of the allocated IP space, in graph form, which demonstrated that Stanford University had more allocated addresses than all of Africa (or something like that).

Does that ring a bell with anyone? What’s the scoop?

thanks

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 15, 2013, 7:06am UTC](https://boards.straightdope.com/t/which-2-class-a-b-c-ip-addresses-are-excluded/660966/14 "2013-06-15T07:06:08Z")

</div>

Stanford probably had a Class A (/8) IP address back then (16,777,216 ip addresses), whereas Africa had smaller blocks.

A related myth (that [Stanford has more IP addresses than China](http://blogs.technet.com/b/ipv6/archive/2007/05/14/mythbusters-2-stanford-has-more-ip-addresses-than-china.aspx)) was (but is no longer) true. Stanford turned in the /8 and has a smaller block, and China has more blocks.

In 2000ish I did some work at a regional hospital in NZ - they had a Class B (/16) address and internet accessible computers (no NAT) and were already getting big money offers from ISPs wanting the address range.

Some ISPs are talking about carrier grade NAT, where multiple residential connections share a single IP address - needless to say, IP purists are aghast at the idea. Just roll out IPv6, already.
