How many ip addresses/hosts in a /32 subnet?

in Networking
I had an interview recently and was asked, "How many ip addresses/hosts in a /32 subnet?" I can't remember if the interviewer said hosts or ip addresses because I was confused about the question. A /32 isn't a valid subnet as you need at least a subnet id, a subnet broadcast and addresses for hosts.. A /32 only has one ip address so you don't have enough addresses for a subnet id, subnet broadcast or hosts.
A /31 will give you two ip addresses, so you can have a subnet id and a subnet broadcast. However, you won't have any ip addresses for hosts.
I told the interviewer "zero" to which he responded that there were four possible addresses in a /32 subnet, but only two usable. I remember being completely confused about why he would say there are four possible ip addresses in a /32 subnet.
Today while thinking about the interview the only thing I can think of to make sense of the situation is that either he said "/32 subnet" but really meant to say "/30 subnet" or he said "/30 subnet" and I heard "/32 subnet". However, I'm almost certain that he said "/32 subnet".
This is a crappy situation because no matter which one it was, I look like an idiot. If he said "/32 subnet" but meant "/30 subnet" and he didn't realize that he misspoke then in his mind I'm stupid for not knowing how many ip addresses are available in a "/30 subnet". If he said "/30 subnet" and I heard "/32 subnet"(unlikely) then I still look like an idiot for not knowing how many ip addresses are available in a "/30 subnet."
Anyone else have a similar situation happen in an interview?
A /31 will give you two ip addresses, so you can have a subnet id and a subnet broadcast. However, you won't have any ip addresses for hosts.
I told the interviewer "zero" to which he responded that there were four possible addresses in a /32 subnet, but only two usable. I remember being completely confused about why he would say there are four possible ip addresses in a /32 subnet.
Today while thinking about the interview the only thing I can think of to make sense of the situation is that either he said "/32 subnet" but really meant to say "/30 subnet" or he said "/30 subnet" and I heard "/32 subnet". However, I'm almost certain that he said "/32 subnet".
This is a crappy situation because no matter which one it was, I look like an idiot. If he said "/32 subnet" but meant "/30 subnet" and he didn't realize that he misspoke then in his mind I'm stupid for not knowing how many ip addresses are available in a "/30 subnet". If he said "/30 subnet" and I heard "/32 subnet"(unlikely) then I still look like an idiot for not knowing how many ip addresses are available in a "/30 subnet."
Anyone else have a similar situation happen in an interview?
Comments
It's actually a trick question. If you don't know it you'd definitely scratch you're head and think about it..which is what I believe they we're looking for...
As for the lowest range you can use that would be a /30. As you know you minus two for Network and Broadcast ID's and since a /30 has 4 addresses you are only left with two usable addresses. A /31 wouldn't work but I've heard rumors in higher levels of Cisco you can use a /31. Perhaps a higher Cisco Engineer could explain better.
As for himself if he said a /32 has 4 addresses and only two are usable then he himself is the moron and not you. That would only work with a /30 unless he is a IEEE board member and he's reinventing IP Subnetting and forgot to leave a memo.
A better choice and one supported by RFCs is that a /31 allows two hosts and no all-zeroes or all-ones broadcast addresses. It's suitable for point-to-point links, where any message is clearly meant for the "other" side, and there's little need for broadcasts.
At that point you changed the question.
This is what baffled me the most. If he would have said one Ip address maps to a /32 I could have seen where he was coming from. This is why I think he either misspoke or I heard the question wrong. I really think it's the former, but do concede the possibilty exists for it to be the latter(however small.)
Interesting, I learned something new today. Will router's let you configure the ip address of an interface with a /31 subnet mask?
That's really interesting. Didn't know that. You got me interested enough to read the RFC
As far as uses for /32, I've seen and used a few scripts where they require an IP address range listed in CIDR notation. I use /32 when I want to specify a single IP address. For simplicity's sake it could be referred to as the /32 subnet since you're specifying a netmask. You seem to be focusing on the word "subnet" that he used, but his question was about how many hosts/ip addresses there were total.
This is one of those times where asking for clarification or giving a complete answer to demonstrate your knowledge rather than a simple answer would be good. "I'm sorry sir, did you ask how many hosts are in a /32 subnet? A /32 would point to a single IP address, but that wouldn't constitute a valid subnet."
I've known some managers to purposefully use impossible scenarios to see how a candidate would respond. At a certain point people should be able to admit when they don't know something and ask for clarification or assistance. If you're working on something and realize you're not sure what's going on, will you bulldoze ahead and risk screwing things up, or will you stop and ask for help? You seemed to realize something wasn't right, why not ask for clarification. It definitely seems he meant /30.
/31 = 2 IP addresses
/30 = 4 IP addresses
/29 = 8 IP addresses
etc.
Forum Admin at www.techexams.net
--
LinkedIn: www.linkedin.com/in/jamesdmurray
Twitter: www.twitter.com/jdmurray
As many others have pointed out, /32 defines a single IP. The term "subnet" is a bit confusing, but there are valid references to a /32 mask.
Regarding the interview, he was either confused, misspoke, or was intentionally laying a trap to see how you'd react. I had a colleague recently reveal that during my team interview (in which he participated as an interviewer), he intentionally mispronounced a term to see how I would react.
M.S. Cybersecurity and Information Assurance, WGU