Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
How does Subnetting Work?

In a same block of IPv4 addresses, can there be same IPs with different submasks? For example, can I have this:

180.70.65.140/26
180.70.65.140/25
180.70.65.140/24

All the 3 addresses above have the same numbers but different subnet mask. Are all the 3 addresses distinct of their own? In other words, 180.70.65.140/25 belongs to User A, 180.70.65.140/25 belongs to User B and 180.70.65.140/24 belongs to User C?

After applying the submask, their network addresses look like this:

180.70.65.140/26 --> 180.70.65.128/26
180.70.65.140/25 --> 180.70.65.128/25
180.70.65.140/24 --> 180.70.65.0/24

If the addresses are recognised uniquely, how is it so? How would each of the these addresses being recognised to be unique?

I am thinking like once I have 180.70.65.140/26, I can't reuse the same numbers of 180.70.65.140 again but since classless is meant to increase the number of IP addresses, it would do much if I can't reuse.

share|improve this question
add comment

marked as duplicate by Chris S, mailq, Ward, Iain, Scott Pack Nov 29 '11 at 17:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 4 down vote accepted

There are numerous reasons, but the simplest is that this will break any routing, because a host will have no way of knowing that they're going to an address on a different network.

So, basically, no. An IP address needs to be unique, regardless of subnet.

In other words, if I'm on

192.168.1.1 255.255.0.0

And I try to access 192.168.1.2, then it's going to assume it's on the same subnet.

On a fundamental level, subnets are there to separate broadcast domains and improve efficiency. They're not for sharing IP addresses.

share|improve this answer
add comment

As an answer to your question above, the answer is: No you can't... It is the address itself that must be unique.

The IP(v4) address in each of the three examples would be: 180.70.65.140 (regardless of subnet mask)

The subnet mask can be thought of as: "what defines the limits of my LOCAL network" In order to reach any IP outside of this range, the computer would need to contact the "gateway" to pass the IP-packet to an external route.

So, for example

180.70.65.140/26 just means that IPs 180.70.65.129 -> 180.170.65.191 are accessible
180.70.65.140/25 just means that IPs 180.70.65.129 -> 180.170.65.255 are accessible
180.70.65.140/24 just means that IPs 180.70.65.1 -> 180.170.65.255 are accessible

Wikipedia has a reasonable link here

share|improve this answer
    
Or in other words: Which other hosts are in my IP group (subnet)? –  mailq Nov 29 '11 at 1:25
add comment

The way I look at it is , your subnet specifications are like a venn diagram. The bigger subnets incompass the smaller subnets. So one IP could exist in all three subnets. So they do have be unique if they are all on the same machine and Vlan etc.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.