Whats the meaning of 10.0.0.1/24 address of my computer (ip addr - command)?

22

14

Whats the meaning of 10.0.0.1/24 address of my computer (ip addr - command)?

  1. 1/24 and not 0/8

  2. 10.0.0 range and not 192.168.10

Yosef

Posted 2010-06-29T19:44:28.407

Reputation: 1 217

if your computer is getting the address via dhcp, it means that the "box" handing out ip's is set up to use the 10 net. some soho routers use this, most use 192.168.?.0 /24. – dbasnett – 2010-06-30T13:49:51.290

SOHO stands for small office / home office – duhaime – 2019-09-10T13:10:32.177

Answers

33

Thought I would expand on this with a few examples

/8 = 255.0.0.0

/16 = 255.255.0.0

/24 = 255.255.255.0

/32 = 255.255.255.255

192.168.1.0/24 = 192.168.1.0-192.168.1.255

192.168.1.5/24 is still in the same network as above we would have to go to 192.168.2.0 to be on a different network.

192.168.1.1/16 = 192.168.1.0-192.168.255.255

When you have a network you lose two IP addresses one for broadcast and one for the network. The first IP is reserved to refer to the network while the last ip of the range is reserved for the broadcast address.

Chris Disbro

Posted 2010-06-29T19:44:28.407

Reputation: 1 214

@Rajani, I was looking over some of these old posts and you are correct. I'm surprised I even made this mistake at the time; thank you for pointing it out. – Chris Disbro – 2015-08-21T19:24:57.527

According to RFC1878 "*Subnet all zeroes and all ones excluded. (Obsolete) *Host all zeroes and all ones excluded. (Obsolete) – dbasnett – 2010-07-01T13:12:21.190

1@chris isn't 192.168.1.1/16 = 192.168.0.0-192.168.255.255 ? – Rajani Karuturi – 2014-05-06T15:08:58.013

7

In addition to Tim's answer:

The /24 instead of /8 means that the first 3 octets of the ip address are used to specify the network. This is just a setting you can change if you want to. It's not super common to use the 10. private range with a /24 mask but there's no reason you can't do it.

/8 is using only the first octet to specify the network portion, which is what a 10. network explicitly meant back in the pre-CIDR days, and that's why you still see it more often with a /8 than with a 24.

As for the last octet being a 0 not a 1, that's because a 10.0.0.0 would in this case be the network address, with 10.0.0.1 being your computers ip.

Dmatig

Posted 2010-06-29T19:44:28.407

Reputation: 1 622

6

RFC 1918 reserves 3 ranges for private IP addresses. Your DHCP server/router is configured to assign this range.

10.0.0.0 - 10.255.255.255/8

172.16.0.0 - 172.31.255.255/12

192.168.0.0 - 192.168.255.255/16

http://en.wikipedia.org/wiki/Private_network

TD1

Posted 2010-06-29T19:44:28.407

Reputation: 155

Sorry, didn't see that part. Dmatig answered above :-) So, your ip address is 10.0.0.1 and the /8 subnet mask or 255.255.255.0 – TD1 – 2010-06-29T20:28:44.073

I think you got the /8 and /24 from the post switched around /24 is 255.255.255.0 /8 is 255.0.0.0 :) – Chris Disbro – 2010-06-29T21:02:11.840

Thanks,Can you please explain to me more simple I dont know networks – Yosef – 2010-06-29T21:05:33.143

see http://superuser.com/questions/54802/what-is-a-subnet-mask-and-the-difference-between-a-subnet-mask-of-255-255-255-0

A subnet mask can also be represented in CIDR notation, like /8. /8 means 255.0.0.0 because the first 8 bits equal 255. (think 8 binary 1's). Now from left to right if 24 binary ones and 8 0's were used we'd get /24 - 255.255.255.0

– Dmatig – 2010-06-29T21:08:54.900

@Chris, you are absolutely right, I have dyslexic mind domsetimes :-) – TD1 – 2010-06-29T21:10:14.587

3

This format 10.0.0.1/24 is so called Classless Inter-Domain Routing CIDR representation so in short it's a bit mask that describes what portion of the IP address can be used for the range.

Here is an example, in your case 10.0.0.1/24 you have 24 bits preserved out of the total 32 bit address field. If you think of an IP address as 4 parts of 8 bits that gives you 255.255.255.255 respectively 2^8.2^8.2^8.2^8 in your case that means this portion, 3 parts of 8 bits, is protected (will not change) 10.0.0 and just the final 8th of the IP will be used as part of the range .1 giving you range in this format: 10.0.0.1 - 10.0.0.255

I presume the 10.0.0.0 IP is preserved for your router, network card or some other device that's why it's not included.

One other thing, probably obvious, the smaller the range number e.g. 32, 24, 16, 8 the larger the IP range.

And finally here is a nice tool for CIDR manipulations http://www.ipaddressguide.com/cidr

infinity

Posted 2010-06-29T19:44:28.407

Reputation: 131

1

Just noting that 10.0.0.0/24 is an invalid subnet. The first valid subnet within the 10.0.0.0/8 (Class A) network, now sliced with a /24 subnet mask is... 10.0.1.0/24. You have to throw away the top/bottom on the network side just like you do for the top/bottom for the host side of that bitmask. For the same reason, 10.255.255.0/24 is also invalid.

For any given subnet mask there are 2x - 2 subnets and 2x - 2 hosts

...where x is the number of bits on that side of the mask. So for /24 that's 24 on the network side and 8 on the host side making 16777214 subnets and 254 hosts. Note the "- 2" part of that calculation on the network side of the bitmask. That means that you have to throw away (you can't issue) those since they mean something to the transport layer of tcp/ip, in this case.

This should make sense to anyone who already knows that you similarly can't bind any 10.x.y.0/24 and 10.x.y.255/24 addresses since they already mean something.

OutsourcedGuru

Posted 2010-06-29T19:44:28.407

Reputation: 11