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!

Subnetting with partial Subnet MAsks

Status
Not open for further replies.

Zugdud

IS-IT--Management
Feb 26, 2003
158
US
Greetings all, I think I have a pretty solid understanding of the basics of subnetting but if you dont mind looking at my ideas and commenting on any wrong ideas I have id appricate it.

Lets say I am using the following subnet mask:


255.255.255.128

Applied to this ip address:

(A valid internet address class A Address) 12.190.195.18

Would the following be true:

Network ID = 12
Subnet ID = 190.195.128
Host ID = 18
Subnet bits = 17
number of subnets = 510
users per subnet = 126
broadcast = 127

Here is how i figured my answer:

First I broke both address down into binary and multiplied them together resulting in the network ID:

11111111 11111111 11111111 10000000 (subnet mask)
00001100 10111110 11000011 00010010 (IP Address)


00001100 10111110 11000011 00000000 (Result)

12.190.195 (Decimal format result network ID)

now that I have my result I determine that the first octet is the internet Network ID Because it is 12 leaving me with 190.195 as the Subnet ID. and then 18 is the host ID because the last 7 bits in the last octet are the only valid host ids right? Because the first 8 bits are for network Id, the next 17 bits are subnet id, and the remaining 7 bits are host id. Using that logic if I had an ip address that looked like this:

12.190.195.210 with the same subnet mask as before 255.255.255.128:

11111111 11111111 11111111 10000000 (subnet mask)
00001100 10111110 11000011 11010010 (IP Address)

this would yield the following:

network id = 12
subnet id = 190.195
host id = 82 or (the remaining 7 bits 1010010 in binary)

I know this seems like an odd question, I am working on a linux cluster (for fun), whats wrong with me? anyway I just wanna make sure I have my TCP/IP theories down pact before plugging everything together. I have been reading information about TCP/IP online but im not quite sure everything is clicking quite right. Am I thinking correctly here does what im saying make sense? please let me know, feed back appricated thanks!!
 
Correction to part of what i posted:

Network ID = 12
Subnet ID = 190.195
Host ID = 18
Subnet bits = 17
number of subnets = 262144
users per subnet = 126
broadcast = 127
 
SubnetID = 190.195.0
Number of subnets is 2^17 - 2 = 131070

However, some networks allow you to use all available
subnets so the answer would be 131072 in these cases (I believe networks like this must comply with RFC 1812).

Since you have 131072 possible subnets, your Subnet ID changes with each subnet. In your example, your Subnet ID is 190.195.0


Feel free to bludgeon me with a rancid pepperoni stick if I am incorrect.
 
I am a bit lazy here. Cause I will use IP calculator for this purpose. That will tell you everything by only putting your IP address + subnet mask only. Simple
 
But using automated tools for things such as this will not help you understand networking as well ;)
 
With the IP address of 12.190.195.18 and the subnet mask of 255.255.255.128 then your network is 12.190.195.0. So, you have,

Network ID: 12.190.195.0
First Host: 12.190.195.1
Last Host: 12.190.195.126
Broadcast: 12.190.195.127

The next range would be 12.190.195.128 with .129 as the first host.

Chris.
**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
iproute:

12.xxx.xxx.xxx is a Class A address (from his original post).

However, given only an IP address and a subnet mask in the 12.xxx.xxx.xxx range, how would you know if it was a Class A address or was following CIDR?
 
Because he gave a subnet mask of 255.255.255.128.

Chris.
**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
That subnet mask can apply to either a Class A or CIDR address. It does not define either one.
 
Regardless, the IP address with a subnet mask gives the network range!

A /25 mask is not classfull.

Chris **********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top