By a coincidence doing some troubleshooting I noticed my tellie had the IP 192.168.1.0 in a DHCP range of 192.168.1.0/24 and the DHCP server being 192.168.1.1.
TV reported having network, but some things requiring Internet Access was not working. After assigning it a fixed IP address (192.168.1.40) the issues were gone.
Is it even possible to get a 192.168.1.0 address with that DHCP range?
192.168.1.40 is range /32
192.168.1.0 is a range /24. You start at 1 counting till 255, zero is reserved for start of subnet and 255 is the broadcast address.
192.168.0.0 is range /16
192.0.0.0 is range /8
I think you have a wrong pool definition, like this example:
/ip pool
add name=pool1 ranges=192.168.0.0/31
This would serve 192.168.0.0 and 192.168.0.1
So instead you would need some pool defined like this: (The name of your pool is confusing as it is just dhcp.)
/ip pool
add name=dhcp ranges=192.168.0.10-192.168.0.100
You dont show us the pool definition I can only see a pool named dhcp referenced:
Tellie, perhaps you need a spot of tea whilst fixing it.
Are you looking for an argument,
This is not an argument
Yet it is, no it isnt, yes it is.
Look, arguing is not just taking a contrary position
Yes it is, no it isnt,
That’s true for routing, but this was just an example how you bring a Mikrotik DHCP server to serve you .0 or .1. And maybe point to the difference between a pool and DHCP server config. So that’s what someone should avoid on a /24…
On 6.49.2 this has worked.
BR
Woland
/ip pool
add name=dhcp ranges=192.168.1.0-192.168.1.255
That would still keep the dhcp server at 192.168.1.1 I presume…
The reason for the naming, or rather lack of perhaps more explicit naming, is that there is no reason for that yet, only one network and nothing else. For now.
These two settings are exactly the same … and wrong. As @msatter hinted, first and last address in a subnet are off-limits, in /24 subnet these are addresses ending with 0 and 255. Valid address pool for a /24 subnet is x.y.z.1-x.y.z.254. It seems like DHCP server doesn’t consider subnet mask when picking address to offer (n.b. pool 192.168.0.10-192.168.1.200 is completely valid in subnet 192.168.0.0/23 which includes 192.168.0.255 and 192.168.1.0 as ordinary device addresses).
While normally it’s not wrong to include address of router/DHCP server because both DHCP server and DHCP client are required to verify availability of offered address it’s still not sensible. One really should allocate address pool only large enough for largest number of devices members of same subnet at the same time and for home LAN I guess 50 or 100 addresses are enough … so pool of 192.168.1.200-192.168.1.254 will probably do. Makes possible to keep static leases outside of pool space.
Actually the subnet 0.0.0.0/8 is reserved and used for self identification ( identifies the network ) whereas 0.0.0.0/32 to identify the host itself…
So am not sure if it is actually correct to use this subnet…
But since it is not the purpose of this post.. ok…
But it may not be in the future. While trying to fix my lack of knowledge about it (I knew that it did exists, but didn’t remember if it is/was actually used for something), I found this interesting initiative that would like to make it into regular public addresses, together with others, including part of 127.0.0.0/8, which is quite wild idea. I can’t decide whether it’s actually useful, pointless, crazy, …
/24 is special as much as any subnet of a bigger special subnet … eg. is a 192.168.x.0/24 special? RFC 1918 makes 192.168.0.0/16 special …
Probably 0.0.0.0/x won’t be entirely released for “normal” use, 0.0.0.0/32 is special after all… E.g. DHCP client without any previous state will send out DHCP discover with src address 0.0.0.0 and dst address 255.255.256.255.
192.168.0.0/16 is indeed special and reserved for private addresses e.g. for local networks and belongs to network class C… 192.168.x.0/24 exists in the /16 so it keeps being a class C network and part of the reserved space for private addressing …
I had an epiphany. Well for me, untrained in the logical side and structure of networks as I am despite working with them.
Router IP can be anything as long as it is fixed and within the regular
Class A: 10.0. 0.0 — 10.255. 255.255.
Class B: 172.16. 0.0 — 172.31. 255.255.
Class C: 192.168. 0.0 — 192.168. 255.255.
ranges.
DHCP Pool can also be anything within those ranges, but I would assume it has to be in the same range as the Router.
This leads me to conclude that - (I may be wrong):
Router IP does not have to be part of the DHCP Pool. (As in you can have a Router on 192.168.11.187 and a pool spanning 192.168.167.23-192.168.167.199)
I have like 5 network books, both analog and digital, but still don’t really get the logic with Net Mask. Slow as a damn lama, but I’ll get there. I guess you are used to Lama’s by now.
Basic principle of IP networking: every device can directly communicate with all other devices in same (sub)net. To determine if communication peer is in same (sub)net, device takes peer’s address, applies own netmask and compares result to result of masking own address. Operation is logical AND. Results of these operations are also known as network address. If both network addresses are identical, then both devices are in same subnet.
BTW: net mask is set either in address-like notation or in CIDR notation as /xx where xx is number of significant bits set. The way of defining it doesn’t affect the arithmetics. Before CIDR, when addresses were strictly divided to classes (A, B or C), network mask was implicitly set by address itself.
Sometimes own network address is set explicitly (and not calculated as in explanation above) and in this case some interesting communications are possible. Peer network address is still calculated.
Example:
calculated network address: logical AND between device address and net mask
own net mask:/23 or 255.255.254.0 -> 11111111.11111111.11111110.00000000
own IP address: 192.168.10.35 -> 11000000.10101000.00001010.00100011
own network address: 11000000.10101000.00001010.00000000 -> 192.168.10.0
peer1 IP address: 192.168.11.254 -> 11000000.10101000.00001011.11111110
peer1 network address: 11000000.10101000.00001010.00000000 -> 192.168.10.0
peer2 IP address: 192.168.12.254 -> 11000000.10101000.00001100.11111110
peer2 network address: 11000000.10101000.00001100.00000000 -> 192.168.12.0
So peer1 is in same subnet while peer2 is not.
Connections between peers in different subnets are only possible via gateways (a.k.a. routers). So device sends packets for peer2 to gateway. Which means that gateway and device have to be in same subnet. Another property of gateways: they are part of at least two subnets (can be as small as /31 or even /32 for point-to-point connections, technically they are still subnets).
DHCP pool: basically tells DHCP server which set of addresses should be used for address leases.
So to question of @SecCon: all addresses in DHCP pool have to fall into same subnet as gateway address (sent to clients by DHCP server as well). They should also avoid the off-limits addresses (network adress as explained above and broadcast address) - DHCP server could be smart enough to avoid them, but in ROS it seemingly doesn’t. Also: all addresses in DHCP pool are in principle allocated for DHCP clients, all devices with known statically configured addresses should fall outside pool range to avoid potential address conflicts.