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

2

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?

romeozor

Posted 2014-06-09T23:40:08.587

Reputation: 143

Are you a CCNA student? because that comes pretty well explained in your course's docs you know. – arielnmz – 2014-06-11T06:17:41.657

@arielnmz I'm a university student, and I had to google what CCNA stands for, so no, I'm not a CCNA student :) – romeozor – 2014-06-11T07:48:41.877

CCNA is a networking course by Cisco, many schools have it available that's why I was wondering. – arielnmz – 2014-06-11T17:51:41.853

Answers

2

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".

masgo

Posted 2014-06-09T23:40:08.587

Reputation: 1 541

1

http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing

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

johntellsall

Posted 2014-06-09T23:40:08.587

Reputation: 356

Don't you mean C which is 1022 (1024-2)? D is for other. – romeozor – 2014-06-10T00:19:05.420

@romeozor: oops, you're right – johntellsall – 2014-06-11T05:59:24.980