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!

Thought I understood subnetting.!? Guess not!! 2

Status
Not open for further replies.
Jan 10, 2001
2,873
US
Well for the most part I understand subnetting. However I am a bit confused on the figuring out available subnets and total nodes for a given address.
Lets take the address 192.168.1.21 with a mask of 255.255.255.0. How can I get the total number of subnets and total nodes from that. I am having trouble understanding the formula (2^n -2) formula. Can anyone help? 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.
 
I can help with the -2 part. the addresses 0 and 255 are considered unwise to use as the Local portion of an IP address ( in binary, all zeros and all ones, in case you were not subneting using a 255.255.255.0 mask)

so instead of 256 addresses, you only get 254

as for the 2^n part

2^8 is 256 as we have 8 zeros when 255.255.255.0 is converted to binary

hope it helps some, or generates corrections I tried to remain child-like, all I acheived was childish.
 
IP Address: 192.168.1.21
Address Class: C
Network Address: 192.168.1.0

Subnet Address: 192.168.1.0
Subnet Mask: 255.255.255.0
Subnet bit mask: 110nnnnn.nnnnnnnn.nnnnnnnn. hhhhhhhh
Subnet Bits: 24
Host Bits: 8
Possible Number of Subnets: 1
Hosts per Subnet: 254

Formula for hosts =
{2^ Host Bits: 8} – 2 = 254 hosts per subnet bits

Formula for subnets = after network portion applied to bits.
Class C uses three octets 110nnnnn.nnnnnnnn.nnnnnnnn. apply to mask gives one subnet value for last octet as 255.255.255.hhhhhhhh

Selected Subnet Address: 192.168.1.0 255.255.255.0
Usable Addresses : 254
Host range : 192.168.1.1 to 192.168.1.254
Broadcast : 192.168.1.255

Notice that the broadcast 192.168.1.255 use one of the bit values hence only one-subnet bit is used


Route once; switch many
 
Notice that the broadcast 192.168.1.255 use one of the bit values hence only one-subnet bit is used should be as

Notice that the broadcast 192.168.1.255 use one of the bit values hence only one-host bit is used. Route once; switch many
 
CCIEWANNABE
Here is one. If I have an IP of 131.13.124.12
How would I figure out the Subnet mask of this? 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.
 
Wow! After the exhaustive treatment you gave the question in thread581-313899, I thought "This guy knows his sh...er, stuff!"

Actually, it comes down to the technical definition of subnetting. Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. As you know, the subnet mask determines the network and host portion of the IP address. Since the case you originally give is a class C and you are using a /24 subnet mask, there is only 1 subnet as CCIEWANNABE stated.

Hee is some info from Cisco on subnetting.

As for the second question, you can't derive the subnet mask given a single IP address. You need to know the mask. That address would be a valid host with any of the following subnet masks.

Mask___________Subnets________Hosts
255.255.0.0 0 65534
255.255.128.0 2 32766
255.255.192.0 4 16382
255.255.224.0 8 8190
255.255.240.0 16 4094
255.255.248.0 32 2046
255.255.252.0 64 1022
255.255.254.0 128 510
255.255.255.0 256 254
255.255.255.128 512 126
255.255.255.192 1024 62
255.255.255.224 2048 30
255.255.255.240 4096 14
255.255.255.248 8192 6
255.255.255.252 16384 2

Does that help?
The Old Man
 
Dont get my question wrong. I know subnetting. There are a few things that are still fuzzy to me. This thread being one of them. I was not sure if you could derive a subnet mask form jsut an IP address. Guess not. The formula (2^n - 2) was a formula I had issues with. It has been cleared up. Thanks for the assistance. Those were my issues. 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.
 
"How would I figure out the Subnet mask of this?"

So far as I know we are given a subnet mask, it is not derived from the address. you can do some reverse engineering to find a subnet mask with trace route, when does a trace wake up a router, but masks are not easy to get out of addresses.

I would love to be wrong on this one, as I would learn something new for sure. I tried to remain child-like, all I acheived was childish.
 
IP Address : 131.13.124.12
Address Class : B
Network Address : 131.13.0.0

Subnet Address : 131.13.0.0
Subnet Mask : 255.255.0.0
Subnet bit mask : 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
Subnet Bits : 16
Host Bits : 16
Possible Number of Subnets : 1
Hosts per Subnet : 65534

Route once; switch many
 
There is a classless and class full IP address design issue to consider. If it were classless it would have a subnet short hand extension. For example /18 or 255.255.192.0 If a router was using RIP AKA RIP v 1 it would know that this was a class full "B" address 10nnnnnn.nnnnnnnn..
Yet, if a router is using Rip v 2 protocol then we can get communication confusion. Rip v 2 protocol supports the use of VLSM.

If I were asked this question; I would respond as I posted as a B class address on subnet 131.13.0.0 because of the address restrictions going on today. There is a lack of valid IP address assignments open.

If the question was posted on a test just compare the answers. Classless can have any shorthand assignments. In example /18 /19 /20 /27 etc., or a variable sized Octet Value!
That’s the clue to look for in a question and answer session. So we assume this is a class full address and start with the first subnet design available. That’s good design practice.

Visit these Links:

Excellent, excellent source requires PDF Reader Adobe free download
Route once; switch many
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top