Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Understanding the xxx.xxx.xxx.xxx/32 format 4

Status
Not open for further replies.

EllaMonroe

IS-IT--Management
Feb 12, 2005
42
CA
Hello,
I am having problems finding information on what 192.168.2.1/24. Its the whole /24 /38 ect that I dont get. It seems to me that you someone might be able to figure out the subnet of a certain IP range with the /32. Anyhow, any links or explaination would be really nice thanks !
 
The number after the slash represents the number of bits that are in the 'on' position in the Subnet Mask. The 'on' position is represented as a 1 in binary.

So, 192.168.2.1/24 means that the subnet mask is

11111111.11111111.11111111.00000000

Count them, there are 24 bits in the 'on' position. The remaining bits are in the 'off' position, represented by a binary 0.

The /# also tells the computer how many bits in the IP address represent the NETWORK portion of the IP address and how many represent the HOST portion of the IP address .

If you say 192.168.1.2/24, that means that the NETWORK address is 192.168.1 (or the first 24 bits - (as each number in the IP address actually represents a combination of 8 bits when converted to binary)), and the HOST address is 2, as the leftover bits represent the HOSTS portion of the IP Address.

So, if you say 121.168.1.20/8, that means that the NETWORK address is 121. (or the first 8 bits), and the HOST address 168.1.20, or the last 3 octects (24 bits). This makes for fewer NETWORK addresses but on the other hand increases the amount of HOSTS you can put on each NETWORK.

So as you can see, the /# is significant in being able to determine which portion of the IP address represents the NETWORK and which portion of the IP address represents the HOSTS.

Hope this helps! Check out this thread for a more indepth discussion...

thread96-445600

Patty [ponytails2]


 
Thank you very much.. Ill take a look at the more indepth thread aswell... have a nice day
 
A star for GrnEyedLdy, who has sanely and consistently answered this series of questions for a long time.

Much appreciated.
Bill
 
Just being a little nit-picker ...
In above example, 192.168.1 is the network portion, but the network address would be 192.168.1.0, right ?
 
My sympathies are with the original explantion.
192.168.1.0 would be (ignoring the 0 for the moment, the HOST address).

192.168.1 would the the network address.
 
bcastner,
you're right, I just checked it. My post is a result of direct translation from Polish naming. I think correct translation should be "subnet address", correct me if I'm wrong again :)

Thanks
 
Here's another star, Patty

I can see why you are an instructor. Your many posts reveel an ability to get it out in simplistic, understandable terms. Excellent, and thanks.

Steve
 
Ok great, now i understand the principle. Might there be availible reference for each /xx. Ie, If I understand it right /30 would give me 2 possible IP's. I would like to have a easy reference guide - you know quick look... on how many ips per / block.

Thank you
 

Bits Borrowed Subnet Mask Network Increment

1 128 128
2 192 64
3 224 32
4 240 16
5 248 8
6 252 4
7 254 2
8 255 1

If you take the 'bits borrowed' in the subnetted octect you can use this quick reference to get your mask and then your network increments.

As for your other question,

A /30 says turn on 30 bits in the subnet mask, starting at the left.

So for example if you owned the following IP Address

185.27.0.0/30 , your mask written in decimal would be --

255.255.255.252

Your mask written in binary would be 30 1's and 2 0's. (There are 32 bits in a subnet mask. 4 octects of 8 bits each)

11111111.11111111.11111111.11111100

187.27.0.0 is a Class B address. The default subnet mask for a Class B address is 255.255.0.0.
Or, in other words the first 16 bits from the left are turned on. You can't change this. So by default your mask is 11111111.11111111.00000000.00000000

Since this example uses a Class B address you know that the first 16 bits are already on, so with a /30 mask, you can surmise that you have borrowed 14 bits from what was designated for host address (16 + x = 30, therefore x = 14).

11111111.11111111.bbbbbbbb.bbbbbb00 -

the 1's are on by default,
the b's are borrowed from Host bits to use as Network bits
the 0's are left over for your Hosts.

With 14 bits to play with (those 14 b's up above), you can make 16,382 networks which can each have 2 hosts on them.

The way I came up with those numbers is as follows

2 raised to the borrowed bits minus 2 or ((2^14)-2) = 16,382 unique combinations that can be formed by using those 14 bits.

2 raised to the host bits leftover minus 2 or ((2^2)-2) = 2 unique combinations that can be made by using those 2 bits.


I hope this helps,

Patty [ponytails2]
 
wow, awesome. This was exactly what i was looking for. I should give you stars!

Thank you
 
A while ago I could not figure out why the formula was:
2 raised to the borrowed bits minus 2
instead of -
2 raised to the borrowed bits

I received very lengthy and quite detailed explanations for this. And then a short explanation by GrnEyedLdy (Patty) and not just a lightbulb lit, but the whole chandelier.

She is a true forum gem.
 

It's really very simple, just intimidating at first because thinking in binary in foreign to us decimal creatures!

Glad that I could help.


Patty [ponytails2]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top