• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

TCP/IP adress decoding???

adlep

Diamond Member
Hi all
Here is the deal
I have IP adress: 192.168.16.0/24

it lies on subnet mask:
255.255.255.240
max subs: 14
hosts per sub: 14
host range: 192.168.16.1 to 192.168.16.14
subnet ID 192.168.16.0
broadcast 192.168.16.15

Well, my question is how the hell you are able to tell all of these information based only on the IP adress? Could anyone point me to a key to resolve all of these info??
 
Great question. Hang on, cause here goes. Hope this is intelligible.

OK...You expressed your IP initially in bit count fashion (xxx.xxx.xxx.xxx /yy). The '/yy' is just another way to express the subnet mask using the number of bits instead of the binary translation. However, you made an error somewhere here. /24 = 255.255.255.0 However, based on the IP information you later provided, it's clear that your subnet mask is 255.255.255.240, which translates to /28, not /24. Given your IP and subnet mask, all of the other information can be deduced.

I usually think of it this way. The most common subnet mask is 255.255.255.0 or /24. It's easy to see how this give you 256 possible addresses on a single network (xxx.xxx.xxx.0 - .255). However, you must always remember that the first address in a subnet is the network address, and the last address is the broadcast address. This means that you lose 2 addresses, leaving room for 254 hosts.

The easy way to figure out the number of addresses on your network is to take 256, subtract the last number of your subnet mask (assuming the first 3 sets are all 255). In your case, 256 - 240 = 16. This is how many addresses you have in your subnet. Remember that the first and last are reserved though, so you can only have 14 hosts. So it works like this:

192.168.16.0 - network address
192.168.16.1 through .14 - host addresses
192.168.16.15 - broadcast address

The next set of 16 addresses begins with 192.168.16.16 (network address) and runs through .31 (broadcast). You actually have 16 max subnets if you continue this pattern because you can repeat this pattern 16 times before you reach an address of .255 and have to stop. The reason this doesn't jive with your report of 14 max subs is complicated, and involves a bunch of junk that I don't want to get into

You can divide a Class C address into subnets as follows:
Subnet Mask------Bitcount-----# of subnets------hosts/subnet
255.255.255.0--------/24--------------1-------------------254
255.255.255.128----/25--------------2-------------------126
255.255.255.192----/26--------------4-------------------62
255.255.255.224----/27--------------8-------------------30
255.255.255.240----/28--------------16------------------14
255.255.255.248----/29--------------32------------------6
255.255.255.252----/30--------------64------------------2


So you can see that every bit you add doubles the number of subnets available to you. Then you take 256, divide by the number of subnets, and subtract 2 (for the network and broadcast addresses) and that's how you get the number of hosts per subnet.

If this doesn't seem intuitive to you, don't worry. I've been working on this stuff for years, and I still have to consult an IP calculator from time to time. If you want one, I reccomend
IP Subnet Calculator

Hope this helps.
 
IPs and Subnets, the crackhead short story (without the aid of spell check)

192.168.16.0/24 is a network address
it means Network address = 192.168.16.0 , Subnet mask = 255.255.255.0

the /24 is a funky way of displaying the subnet mask.
Basically you convert the Subnet mask to binary and then add up the digits:

11111111.11111111.11111111.00000000 = /24 = 255.255.255.0

So as the second half of your post doesn't jive with the first half, since

11111111.11111111.11111111.11110000 = /28 = 255.255.255.240

what is this all good for you ask?

Example:
MY IP = 192.168.1.12
My Subnet mask = 255.255.255.240
Destination Computer = 192.168.1.18

When sending network traffic from your IP to a destination the computer must determin if the destination is on the local subnet, or not (if the latter it forwars the traffic to the default gateway)
The computer makes this determination by deviding both Source and destination IP it 2 parts: Network Address and Host address.

Step one: Convert all values to binary

MY IP = 192.168.1.12
11000000.10101000.00000001.00001100

My subnet Mask = 255.255.255.240
11111111.11111111.11111111.11110000

Destination IP = 192.168.1.18
11000000.10101000.00000001.00010010

where the Subnet mask switches from ones to zeros is the border between Network Address and Host address. If the Network address (first part) is the same, then both computers are on the same subnet, if differant, then not.

In my example 192.168.1.12 and 192.168.18 are NOT on the same subnet.

So how does this tell us how many possible subnets there are and how many hosts per subnet???

Cheap trick: Subtract the subnet mask from 255.255.255.254 to get the number of hosts per subnet
255.255.255.254 - 255.255.255.240 = 14 (hint, always even)

Cheap trick #2: (number of possible hosts / (hosts per subnet + 2) = number of subnets

Number of possible hosts in our example 192.168.1.0 through 192.168.1.255 = 256

256 /(14 + 2) = 16 subnets

192.168.1.1 - 192.168.1.14
192.168.1.17 - 192.168.1.30
192.168.1.33 - 192.168.1.46
192.168.1.49 - 192.168.1.62
192.168.1.65 - 192.168.1.78
192.168.1.81 - 192.168.1.94
192.168.1.97 - 192.168.1.110
192.168.1.113 - 192.168.1.126
192.168.1.129 - 192.168.1.142
192.168.1.145 - 192.168.1.158
192.168.1.161 - 192.168.1.174
192.168.1.177 - 192.168.1.190
192.168.1.193 - 192.168.1.206
192.168.1.209 - 192.168.1.222
192.168.1.225 - 192.168.1.238
192.168.1.241 - 192.168.1.254

Ok, Believe it or not all the info you need is kind of wrapped up in all that. If you work at it you can extract some useful information.

Oh, yeah. A host address of all ones is the broadcast address for the subnet. So :
192.168.1.15 =
11000000.10101000.00000001.00001111
255.255.255.240 =
11111111.11111111.1111111.11110000

Network address =
11000000.10101000.00000001.0000
host address =
1111

Well I probably wasn't much help, but then again I really need sleep (and a spell checker)


 
since I have just spent so much time studying cisco I can subnet/supernet and multicast like no ones business. if you still need help contact me on AIM (kewlb19) or by e-mail: (brianc@ieee.org) and I will help you learn how to subnet, its not that difficult, but with some people it takes a more direct way to learn it then just reading posts.
 
OK
thanks you all for your feedback
its gonna take me some time now to digest all of these info. 🙂
it actually answered my question in 120%
I am starting my MCSE track right now so is about time for me to learn all more about tcp/ip..
Big THX!!!

P.S. Kewlb thanks for the contact info...
 
Back
Top