-2

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 ?

Milan
  • 229
  • 1
  • 4
  • 9

4 Answers4

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.

KEB
  • 61
2

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.

0

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

sandeep.s85
  • 2,189
0

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)

Jarmund
  • 544