View Full Version : subnet question...
GSXdan
08-09-2003, 04:15 PM
You have the IP address of 160.51.21.12. You plan for no more than 126 hosts on the subnet that includes this address. What subnet mask would you use?
A. 255.255.255.254
B. 255.255.255.128
C. 255.255.255.0
D. 255.255.255.248
I know that the answer is B, but dont completely understand. anyone car to explain?
TIA
^dan
bonzai
08-10-2003, 12:09 AM
Assuming that you know your bitwise numbering system, the base of 2.
255.255.255.128 is equal to this in base 2
11111111.11111111.11111111.10000000
Looking at the mask in bitwise form, the 7 zeros on the right will represent the host address, the rest of the digits to the left represent the network address. So starting from 1, the computers can be assigned in bitwise, 00001, 00010, 00011, 00100, 00101, and so on until you finsihed playing with all 7 digits. The computer's address can't be all 0's or all 1's. So, first address will be 0000001, and last address would be 1111110. In base 10, that would be from 1 to 126, giving us 126 addresses assignable to host.
GSXdan
08-10-2003, 12:17 AM
gotcha, for some reason it wasnt clicking eariler. I was thinking, "2 to the what will give me >126" to find out how many bits i had to borrow. i dont know why i was thinking that when it was so obvious 10000000 = 128 - 2 = 126.
thanks
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.