DHCP on RB411 and MT3.17

I have configured DHCP server on RB411 and MT3.17:

/ip pool
add name=pool1 ranges=192.168.1.0/24
/ip dhcp-server
add address-pool=pool1 authoritative=after-2sec-delay bootp-support=static \
    disabled=no interface=ether1 lease-time=3d name=server1
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.1.0/24 comment="" dns-server=192.168.1.1 gateway=\
    192.168.1.1 netmask=24

The first client that connects to server, it lease 192.168.1.255 addresse, why?

[admin@MikroTik] > ip dhcp-server lease print 
Flags: X - disabled, R - radius, D - dynamic, B - blocked 
 #   ADDRESS                  MAC-ADDRESS       HOS... SERVER    RAT... STATUS 
 0 D 192.168.1.255            00:12:75:B6:1F:AD comp... server1          bound  
[admin@MikroTik] >

because range is set to 192.168.1.0/24

set range=192.168.1.2-192.168.1.254

But it’s kind of bug. 192.168.1.255 isn’t host address under 192.168.1.0/24 network, bud MT’s DHCP give it as host address.

No it is not a bug. 255 is in the range, so DHCP will give out 255.

255 is not a valid IP in a /24… It should not be assigned.

MT should know that.

You should know that.

Scott

Range in ip pool is only address range, it does not define any networks and 255 is valid address in that specified range. As you know ip pool is used not only by DHCP.

what if i have /25 /22 /16 network?

like 192.168.0.0/16 and i give 192.168.1.0/24 range to address pool?