cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2337
Views
0
Helpful
8
Replies

A subnet with 127 required hosts?

nathegera
Level 1
Level 1

My professor gave us a task in our networking class a few weeks before. The task was:


Given IP address


192.168.10.0

Make a subnet that has 127 hosts


My professor's answer was: (network address | host range | broadcast address)


192.168.10.0 | 192.168.10.1 - 192.168.10.126 | 192.168.10.127

192.168.10.128 | 192.168.10.129 - 192.168.10.254 | 192.168.10.255


My answer was: (network address | host range | broadcast address)


192.168.10.0 | 192.168.10.1 - 192.168.10.254 | 192.168.10.255

Now, my question is: Was my answer wrong?

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Nathaniel,

I am afraid your professor was not correct. The answer he/she gave provides only 126 usable addresses for hosts.

On the other hand, your answer is correct in the sense that it has enough addresses for 127 hosts. As a matter of fact, the smallest network that allows for 127 hosts must contain at least 256 addresses in total - because on top of 127 host addresses, you also need the network address itself and the broadcast address, leading to an address requirement of 127+2=129 addresses at least. The nearest network accomodating 129 addresses (including the two reserved addresses) is indeed the network with 256 addresses, as you correctly suggested.

Best regards,

Peter

View solution in original post

8 Replies 8

Peter Paluch
Cisco Employee
Cisco Employee

Hi Nathaniel,

I am afraid your professor was not correct. The answer he/she gave provides only 126 usable addresses for hosts.

On the other hand, your answer is correct in the sense that it has enough addresses for 127 hosts. As a matter of fact, the smallest network that allows for 127 hosts must contain at least 256 addresses in total - because on top of 127 host addresses, you also need the network address itself and the broadcast address, leading to an address requirement of 127+2=129 addresses at least. The nearest network accomodating 129 addresses (including the two reserved addresses) is indeed the network with 256 addresses, as you correctly suggested.

Best regards,

Peter

That's what I was trying to explain to the professor but she insisted that I was wrong.

I appreciate the response,

Nath

Hi Nath,

I would like to add something.

If you teacher asked for a subnet for 127 hosts as you mentioned above, I think she is right. The difference is the word "usable". If she asked for 127 usable ip addresses your answer will be right.

Because she asked for 127 hosts (not usable hosts) her answer is right, because the last IP is brodcast IP for that subnet and belongs to all hosts (every host in that subnet can use that ip address to broadcast information to all other hosts in the subnet).

I hope this helps

Eugen

Eugen,

Actually, in our class, when she asks for a number of hosts it is always understood as "usable hosts" where 2^n-2. That's the reason why she provided a second subnet, as you can see in the example she gave. She said 192.168.10.129 is the 127th host.

Nath

I don't know in what context she asked the question, but 192.168.10.129 is the first usable host IP in subnet 192.168.10.128 from what I know. If you configured 192.168.10.1 and 192.168.10.129 on two PCs connected to a switch they wont be able to communicate and her explanation and answer is wrong.

Eugen

Thank you for the response. I appreciate it.

Hello Eugen,

The difference is the word "usable". If she asked for 127 usable ip addresses your answer will be right.Because she asked for 127 hosts (not usable hosts) her answer is right

I respectfully disagree here. You seem to suggest that the word host is interchangeable with the word address. However, that is not correct. A host is always a node in a network - be it an end node or a transit node. You can not assign an unusable address to a node in a network - its operating system will refuse to use the network or broadcast address as its own address. Hence, there is no concept of "usable hosts".

Best regards,

Peter

Hello Peter,

I respectfully agree with you. You are right, I used the wrong words to explain it.

Thank you for correcting me, that way other people reading this post will have the right answer. I will pay more attention next time.

Regards

Eugen

Review Cisco Networking for a $25 gift card