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!

Basic IP Address Question

Status
Not open for further replies.

lmoe

IS-IT--Management
Mar 1, 2004
168
US
I thought I had this clear in my head, but no I am not.

If I am using 10.0.0.1 to 10.0.0.254 and a subnet of 255.255.255.0 -- which octets of the 10.x.x.x can I change and still be on the same network?

Same question for a subnet of 255.255.0.0.

LMC
IT/MIS
"Never stop learning.
 
basic answer
10.0.0.0/24 -> only the last octets can change
10.0.0.0/16 -> the last 2 octets can change




--------------------------------------------------------------------
--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
 
Does that mean that for subnet 255.0.0.0 the last three octets can change?

If so, I am confused.

I though class c (255.255.255.0) allowed for the most IP addresses to be used. Based on the above that logic seems not to work. Obviously, I am misunderstanding this concept.

Could you explain this a bit more?

LMC
IT/MIS
"Never stop learning.
 
With a 24 bit mask, you only get 254 possible hosts. With a 16 bit mask you get 65,534 possible hosts. The subnet mask is used to mask the network portion of the IP address. So if you have 255.255.255.0, you've only got 8 bits for host IP addresses. Because you've masked the first 3 octets. If you want a bigger subnet for more hosts, you change your mask. ie: 255.255.0.0 Now you can have a big LAN of 65,534. Not wise, but you could do it.

"I can picture a world without war. A world without hate. A world without fear. And I can picture us attacking that world, because they'd never expect it."
- Jack Handey, Deep Thoughts
 
Thanks.

LMC
IT/MIS
"Never stop learning.
 
you could even use class B netmask on a class C address... which is called supernetting instead of subnetting...


--------------------------------------------------------------------
--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
 
But also remember that nowadays clas A, B, C, D, E don't have that much to say (I know I know D and E are a special situation)
All IP v4 implementations should support CIDR (Classless Internet Domain Routing if I remember right)
In CIDR you have netmasks like 255.255.224.0 (for a /20)

/johnny
 
And remember that this is only true for private addressing in the range you chose:
[tt]
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
[/tt]
 
Thanks for the calculator and the input.

One thing is still confusing me, however.

I thought a class C subnet allowed for the largest number of ip addresses (betweem A,B & C). Based on the above, at least for one network, this is not the case.

LMC
IT/MIS
"Never stop learning.
 
a default class C subnetmask allows for more subnets (compared to class A, class B and any other custom subnet mask between class A and class C), not hosts per subnet

--------------------------------------------------------------------
--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top