
July 12th, 2002, 08:25 PM
#1
Junior Member
slash notation
I'm definitely a Newbie and I am really trying to understand TCP/IP slash notation. I have found a few sites out there to learn how to convert binary to IP and so forth and also subneting but I need someone to break down / notation in easy digestable form. Ex. 132.64.0.0/24, how do I do the math to figure out how many IP's are available?

July 12th, 2002, 08:44 PM
#2
132.64.0.0/24 means it is a 24bit subnet, or 11111111.11111111.11111111.00000000, or 255.255.255.0
This makes 132.64.0.0 the network, and 132.64.0.1  132.64.0.254 the available addresses. 132.64.0.255 is reserved for broadcast, and 132.64.0.0 is reserved for network ID.
It gets more complicated with a subnet that isnt divisible by 8, but why make things difficult on yourself if you dont have to.
Shkuey
Living life one line of error free code at a time.

July 12th, 2002, 09:25 PM
#3
Junior Member
OOOOHH! OK Thanks!
Hey Shkuey!
That seems simple enough when you break it down like that but I guess the problem that I am having is that say I get a test question that asks how many possible IP addresses can you get from 132.64.0.0/16? Well I know that is a class B network and that there a possible 65,534 IP addresses in a class B. But how do I do the math to say what the exact number of IP's are? Is the process to find the SN ID, then the smallest host ID, then the largest host ID or is there something simpler that I am missing?

July 12th, 2002, 09:53 PM
#4
The number is just the number of 1's in the mask (32 max). All a mask means is that you take 1's in the mask and then the number and then you perform a logical and on the two numbers. In this particular case, the mask refers to the network id while the 0's refer to the hosts.
If you for example had a nonstandard netmask of say /28. That means 28 1's. Lets say we have the network 192.168.9.16/28. First convert your ip to decimal, the place holders for decimal (8 bit) are 128 64 32 16 8 4 2 1
192 = 1 * 128 + 1 * 64 = 1100 0000
168 = 1 * 128 + 1 * 32 + 1 * 8 = 1010 1000
9 = 1 * 8 + 1 * 1 = 0000 1001
16 = 0001 0000
A logical and: true = 1, 0 = false... 1 and 1 = 1 (true), 1 and 0, 0 and 1, 0 and 0 = 0 (false). In other words they both have to be 1 (true) for the result to be 1 (true).
So now we have a 28 bit netmask or 28 1's followed by 32  28 = 4 0's
netmask (or network id) (host or host id)
 
1111 1111 1111 1111 1111 1111 1111  0000
+ (and)
1100 0000 1010 1000 0000 1001 0001  0000_____________________________________
11000 0000 1010 1000 0000 1001 0001  0000
192 168 9 16
Back to decimal, our network id is 192.168.9.16. If you notice there are four bits in the host id, that means there can at most be 15 hosts on this network (1111 = 15).
Now for the tricky part, since you only have 15 hosts per network, the networks if you would break it out for just 192.168.9.0/28, would be as follows:
192.168.9.015 network a
192.168.9.1631 network b
192.168.9.3247 network c
192.168.9.4863 network d
..
..
..
192.168.9.240255 network p
See the pattern yet ? The networks increment in numbers of 15, which corresponds to the number of hosts on the network, which is what you obtained by looking at your netmask.
There are a couple of other things to remember, the 1st and last numbers of every network are always reserved. The first number (for example 192.168.8.16) is reserved as an identifier for the network (and in really old systems is also treated as a broadcast), the last number (for exmaple 192.168.8.31) is treated as the broadcast address, or a reference to every number in that network.
I hope that was a least a little informative. I tend to skip over things or sometimes not thoroughly explain them enough, so if you have any questions about what I was just talking about, please ask.
Neb
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian  Matrix Reloaded)

July 12th, 2002, 10:00 PM
#5
Junior Member
So would the answer be 132.64.0.1  132.79.255.254 ?

July 12th, 2002, 10:45 PM
#6
132.64.0.0/24
In case you didn't see other post I made, binary is very similar to decimal (which is what we normally use) but the multiplier or place holder is 2 not 10.
For example 132 in decimal means 1 hundred + 3 tens + 2 ones
Binary is no different, except that instead of ones, tens, hundreds, the multiple is 2
So you have 1, the next place is 1 * 2 = 2, the next place is 2 * 2 = 4, the next place
is 4 * 2 = 8, the next place is 8 * 2 = 16, etc. Try it with decimal, same difference, the first place is 1, the next place is 1 * 10 = 10, the next place is 10 * 10 = 100, the next place is 100 * 10 = 1000.
Now on to your question,
24 bit mask (which is really all you need to find out how many hosts):
IP's are 32 bit numbers (32 places), a 24 bit netmask means 24 bits of the number are used to identify the network, which leaves 32  24 = 8 places for hosts
24 1's, 32  24 = 8 0's
1111 1111 1111 1111 1111 1111 0000 0000
if you have an 8 (the 8 zeros) bit binary number, 8 places gives you
128 64 32 16 8 4 2 1 in places. The biggest number you can have is
1111 1111 or 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
So the most hosts you can have on your network is 255.
So your network would range from 132.64.0.0  132.64.0.255
Did that make a little more sense ?
Neb
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian  Matrix Reloaded)

July 13th, 2002, 10:43 PM
#7
Junior Member
Neb,
Evevn though this post was not from me, I still got alot out of it! Thanks for the info!

July 13th, 2002, 10:48 PM
#8
BTW, the "slash" notation is called CIDR (Classless InterDomain Routing) notation...
Ammo
Credit travels up, blame travels down  The Boss
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

