Why can't you use 1 or 253 as a subnet mask?

LogomachistLogomachist Registered Users Posts: 3 ■■■□□□□□□□
I'm taking a practice test that came with Mike Myers' All-in-One Comptia Network+ text, and while I think I understand the basic idea behind network masks I'm stumped by the following question:

Which of the following are valid numbers you can use for a subnet mask?
1
254
255
256
253

The correct answers listed are 0, 254 and 255.

Why can't you use 1 or 253 as a subnet mask? icon_confused.gif:

Comments

  • omi2123omi2123 Member Posts: 189
    well, it goes like this;....

    128 192 224 240 248 252 254 255

    128 64 32 16 8 4 2 1

    the bottom line is ur octets & the top line r ur all possible subnet masks.......if u have a network id i.e. 192.168.10.32/27 then ur subnet mask will be 255.255.255.240....look at the last octet on ur subnet mask..../27 means ur forth octet will be anything other than 255.......if u draw the above mentioned chart, then u can see how easily /27 (8+8+8+3) falls into the third column under 224 mask......hope it helps
  • aftereffectoraftereffector Member Posts: 525
    Your subnet mask will be all binary ones on one side and all zeros on the other. 1 in binary is 00000001, so that's out - you can't have a 1 after your zeroes. 254 is 11111110, so that works. 255 is 11111111, which also works. 256 is too many numbers. 253 is 11111101, which is also not a valid subnet mask.
    CCIE Security - this one might take a while...
  • [Deleted User][Deleted User] Posts: 0 ■■□□□□□□□□
    256 is not a valid subnet mask because each IPv4 address octet consists of 8 bits. (128,64,32,16,8,4,2,1) If you have all of those bits turned on, you would have 255 (11111111). 256 would have you rollover into a new subnet.
  • LogomachistLogomachist Registered Users Posts: 3 ■■■□□□□□□□
    Ah OK, I get it now. Thanks!
  • stryder144stryder144 Senior Member Member Posts: 1,675 ■■■■■■■■□□
    What Aftereffecter and kMastaFlash have said is spot on. Also, remember that when counting, we start with 0. Thus, 0-255 is the equivalent of 1-256.
    The easiest thing to be in the world is you. The most difficult thing to be is what other people want you to be. Don't let them put you in that position. ~ Leo Buscaglia

    Connect With Me || My Blog Site || Follow Me
Sign In or Register to comment.