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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP addresses explain. 2

Status
Not open for further replies.

manicmog

Vendor
Jul 15, 2002
2
GB
Hi, Im new to TCP/IP, i have seen a IP address written down like this 10.10.10.34/28. what does the /28 mean ?

Thanks in advance
manicmog
 
I'll give this one a go. Since you're new to TCP/IP you have to understand that all of the IP Addresses and Subnet Masks are written in Decimal to help us understand them a little better. The computers take the Decimal and translate them into Binary. So

255.255.255.255. to us, looks like 11111111.11111111.11111111.11111111 to a computer

Now knowing this...

10.10.10.34/28 means how many bits are used in the Subnet Mask for the Network Address. The remainder us used as the Host address.

28 bits means that....

11111111.11111111.11111111.11110000

When you translate the above binary number into Dec. You get.... 255.255.255.240 <- this is the subnet mask of 10.10.10.34/28 network

10.34.0.0/16 would translate to a subnet mask of...

255.255.0.0 or

11111111.11111111.00000000.00000000

So to answer your question the /28 is the number of bits used as the network address in a subnet mask.

I hope this answers your question....





david e
*end users are just like computers, some you can work with...others just need a simple reBOOTing to fix their problems.*
 
/28 IS SHORTHAND THAT REPRESENTS THE BIT VALUE OF A MASK
11111111.11111111.11111111.111HHHHH notice the 28 bits. Route once; switch many
 
To break sobak's answer down some more for you so you can figure out how he took the /28 and got 255.255.255.240 you do this. The IP/Subnet mask is broken down into 4 &quot;octets&quot; or 4 groupings of 8 digits. So an IP of 10.10.10.34 has 4 groups of numbers, 3 groups of 10 and 1 group with 34. The mask is doen the same way. Now to figure an IPaddress or subnet mask from Binary you figure each grouping like this.

192.168.1.0 > Binary 11000000.10101000.00000001.00000000
Now the inorder to understand the binary you must understand how it is broken down.

192 = 11000000

there are 8 digits in each octet. 1+1+0+0+0+0+0+0
That have a specific value assigned to it.

1 1 0 0 0 0 0 0
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

The binary numbers are given a vaue. In this case the binary 11000000 = 128+64+0+0+0+0+0+0 which = 192

The values are always the same.(128,64,32,16,8,4,2,1 in this order)
Another example would be: 186.154.100.1

186 = 10111010

1 0 1 1 1 0 1 0
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

Added up: 128+0+32+16+8+0+1+0 = 186

154 = 10011010

1 0 0 1 1 0 1 0
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

Added up: 128+0+0+16+8+0+2+0 = 154

100= 01100100

0 1 1 0 0 1 0 0
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

Added up: 0+64+32+0+0+4+0+0 = 100

and 1 would simply be 00000001

Once you understand how to break an IP address down to its binary and back then the other addresses will be easy to do. Subnet mask is the same way.
So when you see an address such as 10.10.10.34/28
You will know how to break the IP address down to binary
00001010.00001010.00001010.00100010

So what about the /28 for subnet mask? Just as stated above the /(number) would be the number of bits in an IP address. a bit is represented by 1. So 28 is
11111111.11111111.11111111.11110000

If it was /16 it would be 16 1's followed by 16 0's (there are 32 bits in an IP address (4 groups of 8)
11111111.11111111.00000000.00000000

Then you would just take that number and apply what I showed above to each section.

/28 = 11111111.11111111.11111111.11110000
Which in turn translates to = 255.255.255.240
1 1 1 1 1 1 1 1
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

Which = 128+64+32+16+8+4+2+1 = 255

And the last octet would be:
1 1 1 1 0 0 0 0
^ ^ ^ ^ ^ ^ ^ ^
128 64 32 16 8 4 2 1

Which = 128+64+32+16+0+0+0+0 = 240


Understand? If not let me know. [bugeyed]

James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
And to further clarify things, I'd recommend that you go to
and go throught their tutorials. I bought the package, but I believe that they also have some free content.

Hope that helps ------------
Certified in absolutely nothing :)
 
Learn subnet.com is a great site. You can also use a sientific calculater that is in accesoris on your pc to convert these numbers to octets and play with the numbers above so you can actually see what they mean. Glen A. Johnson
Microsoft Certified Professional
glen@nellsgiftbox.com
[americanflag]

&quot;Everything becomes a little different as soon as it is spoken out loud.&quot;
Hermann Hesse (1877-1962); German-born Swiss writer.
 
How do calculate the no of hosts and network for 10.10.10.34/28? Best Regards
YH Chooi
 
IP Address : 10.10.10.34
Address Class : A
Network Address : 10.0.0.0

Subnet Address : 10.10.10.32
Subnet Mask : 255.255.255.240
Subnet bit mask : 0nnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
Subnet Bits : 28
Host Bits : 4
Possible Number of Subnets : 1048576
Hosts per Subnet : 14

Subnet Mask values remaining tell you how many hosts
(2^4 host bits)- 2 = Hosts per Subnet : 14

Route once; switch many
 
And another way to look at it is take the last numeric octect (240) subtract it from (255) (which is the full value of that octet)240-255 which = 15 and subtract 1 and get 14 hosts for that network. Understand? James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
Thanks for the calculation for the no of hosts per subnet.

How do we calculate the no of subnet?

Best Regards
YH Chooi
 
Subnet bit mask values in the network portion of mask:
(2^28 network subnet bits) = Possible Number of Subnets 1048576


Route once; switch many
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top