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.

This is very basic question but i really could not find how it will be.There are two network IP address are given 10.0.0.10/24, 30.0.0.10/24 .Would like to know are these two addresses in same network or in different networks

I believe its in same network but one of tutorials says its in different network may be I interpreted wrong.

Can anyone please give clear picture about IP address ?

share|improve this question

closed as off topic by MadHatter, Tom O'Connor, Dan, MDMarra, ThatGraemeGuy Oct 10 '12 at 11:51

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
The question/answer is a bit daunting, but what you want is here. serverfault.com/questions/49765/how-does-ipv4-subnetting-work –  Zoredache Oct 10 '12 at 6:49

4 Answers 4

The 24 is the size of subnet.

To really calculate if both ips are in the same subnet you would have to write the ip as binary (windows calculator is your friend ;)):

decimal: 10.0.0.10/24
binary:  00001010.00000000.00000000.00001010
the first 24 bits are the subnet:
00001010.00000000.00000000.xxxxxxxx

and

decimal: 30.0.0.10/24
binary:  00011110.00000000.00000000.00001010
the first 24 bits are the subnet:
00011110.00000000.00000000.xxxxxxxx

So if boths subnets are identical, the IPs are on the same subnet.

The subnets are different: -> 10.0.0.0/24 and 30.0.0.10/24 are on different subnets.

"24" is a special subnet. 24 bits are 3 bytes (the first three blocks of the ip are the subnet).

So you don't have to mess up with bits.

30.0.0.10/24 -> subnet: 30.0.0.x (correctly written as 30.0.0.0/24)
10.0.0.10/24 -> subnet: 10.0.0.x (correctly written as 10.0.0.0/24)

Example for two ips in identical subnets:

  • 10.0.0.30/24
  • 10.0.0.10/24

see http://en.wikipedia.org/wiki/Subnetwork for more details.

share|improve this answer

They are in different subnets for sure. See the '/24' in the end. It signifies that first 24 bits are the network address and rest would be the host address. Since the first 24 bits are different, hence they are different subnets.

Example: 10.0.0.10/24 and 10.0.0.45/24 are in same network. In fact 10.0.0.XXX would be in same network.

share|improve this answer
    
Thanks Aditya for your response ,one more doubt would like to ask if subnets bits are not given ,how do we identity a network? Is it based on Classful addressing then? –  Patha Oct 10 '12 at 6:51
    
Because IP addresses are depleting, classful addressing is rarely used. Mostly CIDR is all around us. But if subnet bits are not given, I guess it is implied that classful is being used. Still ask for the bits every time just to be safe. –  Aditya Patawari Oct 10 '12 at 6:59
    
Aditya can we conclude it as these two address are in same networks but on different subnets in that network? –  Patha Oct 10 '12 at 7:04
    
They are on different subnet for sure. In real life scenario there is a possibility that they might even belong to the same machine. With the information you have provided, it is difficult to tell more. I think you should read the comment on your question by @Zoredache to understand the concepts. –  Aditya Patawari Oct 10 '12 at 7:09
    
Anyways Thanks again Aditya.. –  Patha Oct 10 '12 at 7:19

They are on different network. 10.0.0.10/24 means there can be 254 usable hosts on this network. It will become 10.0.0.10 Subnet mast --> 255.255.255.0 10.0.0.0 --> Network Address 10.0.0.1 --> 10.0.0.254 --> Usable hosts 10.0.0.255 --> Broadcast Address

So all hosts having ip's between 1 - 254 are on same network.

Same goes for 30.0.0.10/24 network.

But those two are different networks. Because 30.0.0.0 will have it's host start from 30.0.0.1 to 30.0.0.254

I hope it helps

share|improve this answer

The clue is the /24 part. /24 means that the first 24 bits (which correspond to the first three octets of the IP) is the subnet-part of the address. Since this part is different in both of the IPs, they're on different subnets. They might still be on the same physical network (i.e., cabled together to the same switch), but they won't be able to talk to eachother without a router present.

Without the subnet mask, it's hard to identify the network size/class, but there are some defaults reserved for private LANs:

  • 192.168.xxx.0 is usually a /24 or /16 network
  • 10.xxx.xxx.0 is usually a /8 network
  • 172.(16 - 31).xxx.xxx is usually a /20 network (Not as common as the other two)

PS: /24 is a short-form of writing that the IP has a networking mask of 255.255.255.0. Other common ones are /8 (255.0.0.0) and /16 (255.255.0.0). There are also other subnet masks that don't line up with whole octets (i.e. subnet masks that don't consist of just 255 and 0), but that's beyond the scope of this answer (Read up on CIDR, if you're interested)

share|improve this answer

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