Yes, each number can land somewhere between 0-255, but there are some default reservations on specific IP ranges.
For instance, 0 is typically used as an identifier for the subnet, not as an actual device IP. For instance, a DHCP server may tell a device “your IP address is 192.168.1.168. The subnet range is 192.168.1.0/24 (meaning the mask is 255.255.255.0). But the 0 won’t (or shouldn’t) get assigned to a specific device.
255 is another special address, as it is used for broadcast messages. A packet sent to 255 gets sent to everything in that subnet. So for instance, if I wanted to broadcast a message to everything on the 192.168.1.0/24 range, I would send it to 192.168.1.255.
In regards to reserved IP ranges, there are a few standard private IP ranges:
192.168.0.0/16 one of the more common. (Subnet mask of 255.255.0.0). This basically means that (if everything is configured properly) your WAN IP won’t ever be something inside of that same range, as the router would very quickly throw up its hands in defeat. Like if your WAN IP from your ISP was 192.168.1.50, and you also had a device on your network with that same IP address, the router wouldn’t know which one (WAN IP or LAN device) to send traffic to.
The second private IP range is 172.16.0.0/20 (subnet mask of 255.240.0.0) meaning the second number can range from 0-31, and the last two octets can range from 0-255.
The last common private IP range is 10.0.0.0/8, (subnet mask of 255.0.0.0) so the last three octets can range from 0-255. You tend to see these more in corporate settings, as it allows for a truly astronomical number of devices to be connected.
Basically, all of this means that if you see an address in the 192.168.x.x, 172.0-32.x.x, or 10.x.x.x range, you know it’s a private IP address, not a WAN IP.
Long story short? The subnet mask determines which numbers can change. A mask of 255 means there is no change. A mask of 0 means any number can change. So for instance, a range of 192.168.1.0 with a mask of 255.255.255.0 will only find other devices in the 192.168.1.x range. Because the last octet is the only one that isn’t 255.
And writing the range as 192.168.1.0/24 is simply a shorter way to accomplish the same thing. Each group of numbers is an octet made of 8 bits. So masking the first 8 bits (255.0.0.0) is /8. Masking the first 16 bits (255.255.0.0) is /16, and masking the first 24 bits (255.255.255.0) is /24. So 192.168.1.0/16 would be able to find anything in the 192.168.x.x range.
If you want to get really deep in it, you can manually calculate subnet masks. Remember that computers work in binary, and the octets are each a group of 8 bits. For example, the IP address 192.168.42.67 could also be written as 00000011.00010101.01010100.11000010 but that’s a nightmare for humans to remember so we use base 10 by default.
The subnet mask tells the computer which bits may be different. So a subnet mask of 255.255.255.0 looks like this: 11111111.11111111.11111111.00000000. So the computer will only scan for neighbors on any bits that are 0’s (unmasked). So in this case, if the range is 192.168.42.0/24, it will assume that the first three octets (192, 168, and 42, respectively) are going to match. So it will only scan for differences in the last octet.
I’m still angry even 15 years later after a teacher lowered my grade just because I checked “USB” as capable technologies for video transmission. There are literally USB monitors.
Granted, back then it really wasn’t popular and bandwidth was shit, but it was capable of it.
USB to VGA dongles were definitely a thing over 15 years ago. USB 2.0 could manage it fineish. Maybe not at high resolutions and refresh rates, but it could handle a monitor just fine.
The fact that I have a test in school today, and this is probable questiom in it, and this post reminded me of it, thanks I guess?
EDIT: wait, so each number should be maximum of 255? Why did I think it was just the last numbe :|
anyway thanks again for the unsolicited coincidental heads up
Yes, each number can land somewhere between 0-255, but there are some default reservations on specific IP ranges.
For instance, 0 is typically used as an identifier for the subnet, not as an actual device IP. For instance, a DHCP server may tell a device “your IP address is 192.168.1.168. The subnet range is 192.168.1.0/24 (meaning the mask is 255.255.255.0). But the 0 won’t (or shouldn’t) get assigned to a specific device.
255 is another special address, as it is used for broadcast messages. A packet sent to 255 gets sent to everything in that subnet. So for instance, if I wanted to broadcast a message to everything on the 192.168.1.0/24 range, I would send it to 192.168.1.255.
In regards to reserved IP ranges, there are a few standard private IP ranges:
192.168.0.0/16 one of the more common. (Subnet mask of 255.255.0.0). This basically means that (if everything is configured properly) your WAN IP won’t ever be something inside of that same range, as the router would very quickly throw up its hands in defeat. Like if your WAN IP from your ISP was 192.168.1.50, and you also had a device on your network with that same IP address, the router wouldn’t know which one (WAN IP or LAN device) to send traffic to.
The second private IP range is 172.16.0.0/20 (subnet mask of 255.240.0.0) meaning the second number can range from 0-31, and the last two octets can range from 0-255.
The last common private IP range is 10.0.0.0/8, (subnet mask of 255.0.0.0) so the last three octets can range from 0-255. You tend to see these more in corporate settings, as it allows for a truly astronomical number of devices to be connected.
Basically, all of this means that if you see an address in the 192.168.x.x, 172.0-32.x.x, or 10.x.x.x range, you know it’s a private IP address, not a WAN IP.
The last time I was this confused reading something was when I was trying to under organic chemistry.
Long story short? The subnet mask determines which numbers can change. A mask of 255 means there is no change. A mask of 0 means any number can change. So for instance, a range of
192.168.1.0with a mask of255.255.255.0will only find other devices in the192.168.1.xrange. Because the last octet is the only one that isn’t 255.And writing the range as
192.168.1.0/24is simply a shorter way to accomplish the same thing. Each group of numbers is an octet made of 8 bits. So masking the first 8 bits (255.0.0.0) is /8. Masking the first 16 bits (255.255.0.0) is /16, and masking the first 24 bits (255.255.255.0) is /24. So192.168.1.0/16would be able to find anything in the192.168.x.xrange.If you want to get really deep in it, you can manually calculate subnet masks. Remember that computers work in binary, and the octets are each a group of 8 bits. For example, the IP address
192.168.42.67could also be written as00000011.00010101.01010100.11000010but that’s a nightmare for humans to remember so we use base 10 by default.The subnet mask tells the computer which bits may be different. So a subnet mask of 255.255.255.0 looks like this:
11111111.11111111.11111111.00000000. So the computer will only scan for neighbors on any bits that are 0’s (unmasked). So in this case, if the range is 192.168.42.0/24, it will assume that the first three octets (192, 168, and 42, respectively) are going to match. So it will only scan for differences in the last octet.Wait, that actually made sense? I kinda knew some of this but now it all commceted makes sense. thanks lol
I’m still angry even 15 years later after a teacher lowered my grade just because I checked “USB” as capable technologies for video transmission. There are literally USB monitors.
Granted, back then it really wasn’t popular and bandwidth was shit, but it was capable of it.
USB to VGA dongles were definitely a thing over 15 years ago. USB 2.0 could manage it fineish. Maybe not at high resolutions and refresh rates, but it could handle a monitor just fine.
Each number between the dots is made up of 8 bits, so each one is a maximum of 255.
Update, they didn’t ask that questiom. For the exam XD
Hope it went well!
It did, I mean it was a computer science test which was easy (I help the computer teachers to solve stuff in school lol)