Possible Duplicate:
How does Subnetting Work?

I have started my CCNA course. I wanted to get clarified on this question. can two machines have the same public address with the subnet masks(i.e network address) different. Since is not equal to Then how come when I can ping an ip address without specifying the subnet mask?

marked as duplicate by DanBig, Tom O'Connor, sysadmin1138 Jul 17 '12 at 20:08

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.


Netmask define set of hosts that are accessible to each other directly, without routing. Bigger subnet /24 include smaller /30 as subset but also that means, that in bigger subnet /24 all hosts can see each other and that drive to the adress-conflict.


No, two hosts cannot have the same address. Nope, nope, nope.

  • 1
    No matter what subnet is in use, it is still the same IP, so Sirch is totally right. – Frederik Nielsen Jul 17 '12 at 15:08
  • That not always correct. At least, many hosts has the same addresses from RFC1918. But that only possible if that hosts are not accessible to each other without NAT or else. – Kondybas Jul 17 '12 at 15:18
  • 4
    Well, two hosts can have the same IP address, technically. There's even a a name for it - "IP address conflict." :) – HopelessN00b Jul 17 '12 at 18:58

You seem to be confused on a fundamental level about what a subnet is. See DanBig's comment. And Sirch's answer. And Kondybas' answer too.

I'll try to give you a bit more of a fundamental explanation about what you're doing wrong to even arrive at your question.

And since I don't like your examples (it doesn't make a whole lot of sense to use or, and I don't think those are legal subnets either), I'm going to give my own.

First of all, is NOT an IP address. It is a subnet. Therefore, do not treat it as an ip address, and just plug any number you feel like into the last octet. It designates the 24 bit subnet (class C subnet) begining at As it's a full class C, it encompasses all 256 IPs starting with 123.123.123. So you could say it means "the subnet comprising all IP addresses between and"

When only dealing with class C subnets, the last octet of the IP may seem trivial, but it's not. Say you have a /27 subnet, for example. This would be a 32 host subnet, for anyone whose binary math is a bit rusty. If you were given a /27 subnet by your ISP, and had 32 externally facing IP addresses somewhere on 123.123.123, it might be useful to know the actual range you're allocated, not just that you have 32 IP addresses allocated somewhere in that range. Right? Well, that's where the last octet of the IP address makes a difference. It designates that you have however many available IP addresses, starting at that last octect.

So, would give you through, whereas would give you through And so on.

As previously mentioned, a much more in depth explanation is here.

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