Custom subnetting help?
Alright so im taking a networking course in college and right now we are working on subnetting. the problem is no matter who explains it i just cant grasp custom subnet masks. Maybe some of you can help?
example:
# of needed subnets: 2000
# needed useable hosts: 15
Network Address 178.100.0.0
Address Class: B
Default Subnet Mask: 255.255.0.0
Custom Subnet Mask: 255.255.?.?
Total number of subnets: ____________
Total Number of hosts borrowed: _______________
Number of useable Addresses: _______________
Number of bits borrowed: __________________
178 . 100 . 00000000 . 00000000
IIIIIIII . IIIIIIII . 00000000 . 00000000
So im not sure where i should go from here. I know that the equation ((2^X) -2)) somehow works its way in but not sure exactly how or when. None of my materials help and the profs explanations are jibberish to me because he doesnt offer any reasoning on why it works the way he shows it and how to figure out what to use when and what each step does and why it works that way.
Any help would be greatly appreciated!
Thanks
I'll try to help. The formula works for since ip addresses uses binary, this gives the 2 in the 2^x. The x is the number of bits in the binary number, in one octet there are 8 (the 8 zeros). So 2 to the power of any number gives the total amount of different combinations or different addresses/networks. If you have 3 zeros or bits then it is 2^3 which comes out to 8, so 8 different possibilities. Now for the minus 2(used for calculating hosts not networks). The minus 2 is put there because in a range of addresses, the first is the network address and last is a broadcast address and these cannot be used for the hosts.
Now for your problem. First I would get the total number of bits or x needed to get at least 15. Through using the formula given I would need 5, 4 is too small since it gives me only 4 usable addresses (remember the minus 2: 16-2=14). The 5 gives me 32 host addresses. The host bits are the last bits so it will be the last 5 zeros:
178 . 100 . 00000000 . 00000000
IIIIIIII . IIIIIIII . 00000000 . 000|00000|
|Host Bits|
Next is the network bits. We can use the same formula but without the minus 2. Since we have 16 zeros or bits and 5 of them were used in the host addresses this leaves 11 for the network bits. We need to get an x amount of bits which would give us at least 2000 network possibilities. Using the equation 2^x I figured that the remaining 11 bits is just enough, giving us 2048 possible network addresses so we know that the 5 bits we borrowed for the users is just enough.
178 . 100 . 00000000 . 00000000
IIIIIIII . IIIIIIII . 11111111 . 111|00000|
| Network Bits |Host Bits|
Since the default subnet mask was 255.255.0.0 and we borrowed 11 bits from the host portion(all that was zero was host) we know that 8 bits is 255 for the third octet (255.255.255.x) now for the remaining 3 we know it is 224 since the bits have a value from(left to right) 128,62,32,16,8,4,2 and 1, the leftmost 3 bits add up to 224. So the new subnet mask is 255.255.255.224. The usable hosts were calculated to be 30, the subnets/ networks were calculated to be 2048, and we borrowed 11 of the 16 zeros or bits for the network. The only thing I am not sure about is the hosts borrowed since I have never encountered that before.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now