Possible Duplicate:
How does Subnetting Work?
I have to learn how to subnet by hand for the CCNA exam. And I'm having real problems doing it. I keep getting stuck.
Here's an example:
138.248.184.17/18 - IP
255.255.192.0 - Subnet Mask
192 = 1100 0000 in binary
And I know 184 in the IP address is the "octet of interest".
OK I get that far...and then I'm lost.
I know I need to set the network bits of 192(I think?) to all 0 for the network ID and then to all 1 for the broadcast ID. Problem is how do I know which part of 11000000 is network and which part is host?
First, read the linked post.
Don't worry. I understand the value of preparing your RFC 1149 network after the shipwreck.
You don't need to convert the whole IP to binary. The first two octets you already know because the mask is all ones (255 = 11111111), so 138.248.something.
The third octet you do need to convert to binary up until the end of the ones since you are doing a bitwise AND. Convert the netmask's octet to binary: 192 = 11000000. Here you only need to examine the first two bits of the third octet since the rest you know is zero. 184 is less than 192, so it must start with 10 since if it started with 11 it would have to be 192 or greater. Thus, the third octet of the network is 128.
The fourth is 0 since the fourth octet of the netmask is 0.
138.248.128.0
ipcalc
can help you check your math.