08-05-2007 05:14 AM - edited 03-05-2019 05:43 PM
i read this in some book:
i have ip addrees 172.31.128.255/18 and it says that its unicast address!
how can that be? it says also that its broadcast address is 172.31.131.255.
from my calculations the broadcast is 172.31.191.255 and in the address
172.31.128.255 the 3rd octet is network number of sort so how can that be a unicast?!
please help me
08-05-2007 05:59 AM
Hi,
172.31.128.255/18 is a unicast indeed, please check its subnet mask:
255.255.192.0
The r3d octet is 1 1 0 0 0 0 0 0 (the first two bits must match, which is 128 meaning that they must be "1 0"
and the 4th octet is 0 0 0 0 0 0 0 0 (which means that the 4th octet can have any values from 0 to 255)
and thus having all ones (255) in the 4th octet is fine to be unicast as the broadcast of this subnet is 172.31.191.255 (all ones in the rest of the bits in the 3rd octets and all ones in the 4th octet).
And accordingly you are right in that the broadcast is 172.31.191.255.
HTH,
Mohammed Mahmoud.
08-05-2007 12:07 PM
For better understanding, write the address and mask in binary.
For an address to be a broadcast address, all HOST bits need to be 1's. If at leas one host bit is 0, than it's not broadcast.
Network address on the other hand is when all host bits are 0's. If at least one host bit is not 0, than it's not broadcast.
Your example in binary:
Address: 1010110.100011111.10 | 000000.11111111
Mask: 11111111.11111111.11 | 000000.00000000
I put "|" mark where network and host portions are divided. Mask specifies that (where string of 1's end)
As you can see, some of host bits in the address are not 1's, that means it's not broadcast address.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide