Computers & Hardware > Networking
Dot zero / zeroth device in subnet
Weaver:
What problems if any am I likely to encounter if I allocate the first IP v4 address in a subset to a device? That is: x.x.x.0 or dot base-plus-zero if the subnet is smaller than a /24 and doesn't start on .0. My current main IPv4 /26 is based at .192 and out of old-fashioned superstition I have not allocated .192 to any box. I have never actually been given a real concrete reason not to do it, just told it bad juju.
Same question with IPv6 too. I used xxxx:1 rather than :0 for a node a while back for example.
The obvious answer is to try it out and pray.
(I get the feeling I have asked this question many years earlier, if so: mea culpa maxima.)
andyfitter:
I don’t think you can ever user the first or last address in a subnet for an individual device in IPv4. The first address is the subnet identifier used for routing and the last is the broadcast address.
Weaver:
Agree Andy. The last address is obvious.
However I've never been able to find out why one can't use the first address. Maybe need to express it in these terms:
1. Exactly what bad thing is going to happen to you if you do?
or
2. Exactly what prevents you from just doing it?
I only just realised that the things I have read are ambiguous and maybe some people have been talking about (2), the _ability_ to do so. Epistemic modality vs deontic modality.
I am able to commit the crime, but am I able to get away with it? Or would others not be able to get away with it, or even not be able to commit it?
d2d4j:
Hi weaver
Sorry if I’m not understanding
Do you mean an internal ip range or ipv4 range externally assigned to you
If internal, I don’t think the nic would let you assign .0 but if it did, you would not be able to use it I don’t think, and/or it could cause routing issues
If external ip range, same thing but provider may also not be happy with you
Many thanks
John
burakkucat:
Let us consider the 16-bit private address space, 192.168.X.X/16
If I was performing an nmap scan, I could use 192.168.0.0/16 or 192.168.[0-255].0/24 as the address target range. (In the latter case, I have used [0-255] just to signify that the number in that position is any one from the range so specified and not something funky for nmap to perform.) Explicitly: 192.168.0.0/24 specifies the range 192.168.0.0 to 192.168.0.255 and 192.168.0.0/16 specifies the range 192.168.0.0 to 192.168.255.255 (if I've typed it correctly).
Now I perform two simple ping tests --
[Duo2 ~]$ ping -c 1 192.168.1.0
Do you want to ping broadcast? Then -b. If not, check your local firewall rules.
[Duo2 ~]$ ping -c 1 192.168.1.255
Do you want to ping broadcast? Then -b. If not, check your local firewall rules.
[Duo2 ~]$
In both cases the ping command responds as if both target addresses are broadcast addresses. Possibly a bug in the ping command.
What use or relevance is the above? :shrug2:
Navigation
[0] Message Index
[#] Next page
Go to full version