How many hosts can an IPv4 /22 network handle at most?

This came up in a test question and I would like to know the real answer as the possible choices confuse me.

How many hosts can a network handle at the most, based on the following address: 135.46.56.0/22

A: 1024, B: 1023, C: 1022, D: other

So if I'm not mistaken, /22 is 1024 (2^10) hosts. However, I'm not sure if network and broadcast address should be taken into consideration. I have the big book of networking by Tanenbaum and the example shown there doesn't exclude either one. I have an app on my phone that does this calculation and it points out the usable number of IP addresses is 1022 (google also found a claculator that said the usable number was 1023).

Could someone clear this up for me?

3

2 Answers

For most (if not all) real-world scenarios he answer is C: 1022 addresses.

In theory you could use all 1024 addresses. But RFC 919 explains why you should reserve two addresses for special purposes: broadcast to all hosts and addressing the network itself.

You could choose any two addresses to be these special addresses, but If different IP implementations are to be compatible, there must be a distinguished number to denote "all hosts". (RFC 919, section 7).

The RFC concludes with this nice summary:

If the use of "all ones" in a field of an IP address means "broadcast", using "all zeros" could be viewed as meaning "unspecified". There is probably no reason for such addresses to appear anywhere but as the source address of an ICMP Information Request datagram. However, as a notational convention, we refer to networks (as opposed to hosts) by using addresses with zero fields. For example, 36.0.0.0 means "network number 36" while 36.255.255.255 means "all hosts on network number 36".

Yes. (addr)/22 = 1024 addresses, with traditionally one reserved for broadcast, and one reserved for the network itself.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like