Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hy there,

I was wondering if it is possible to have two different networks connected on one router who which have the same ip, and are differentiated by a subnet mask?

For example:

Are they considered different because their network prefix is different?

Does that mean that with the ip address we can actually address. -> 2 computers - 2 (for broadcast and network name)

+ -> 4 computers - 2

+ -> 8 computers - 2



Does it mean that we can uniquely define adresses for, what ever the number turns out to be, computers?

share|improve this question
Great question, I think a lot people make this assumption and its good to have it answered here authoritatively. – SpacemanSpiff Sep 24 '12 at 19:29
up vote 6 down vote accepted

No, it does not. The subnet mask is used exclusively for routing decisions (the routing algorithm needs a hint what hosts are local and what needs to be sent to a gateway), the addresses have to be unique in any case.

See also:

But you can set the netmask arbitrarily to match your requirements on subnet size, of course.

There are also techniques (mainly NAT) which would allow two networks with overlapping IP address spaces to communicate by remapping the overlapping address spaces to unique ones. In your example, with two separate networks A and B both including subnets of, the remote subnet could be presented as a different, not yet used subnet - e.g. The router would perform the necessary address translation operations forth and back to re-establish address uniqueness as visible by each of the networks A and B.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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