Constant DHCP server assigning and deassigning

Hi,

I have a little problem in my network where RB4011iGS+ constantly keeps assigning and deassigning IP addresses for three devices in my network and also disconnecting from WiFi multiple times in a minute. When they are connected they ping in LAN but won’t connect to Internet. All three devices are using ESP8266MOD WiFi module. There are two other devices connected to same SSID and they have no problem.

My setup is like this: RB4011iGS+ → Ubiquiti US-8-60W → Ubiquiti UniFi nanoHD → WiFi clients

First I thought that clients are not getting along with Ubiquiti AP. But after long trying different settings nothing changed. I made hotspot with mobile with same SSID and WPA2 key and devices connected immediately and stayed connected.
Then I configured MikroTik mAP as bridge to cut off Ubiquiti AP. DHCP client to ether1 and same WiFi SSID and key as I originally use. Result was same as with original setup, DHCP kept assigning/deassigning and wireless connections dropped.
After that I made new DHCP server to mAP. Now clients kept wireless connected and IP assigned.

This is an output form MikroTik log.

18:08:59 dhcp,debug,packet IoT_dhcp received discover with id 16829867 from 0.0.0.0 
18:08:59 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:08:59 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet     Msg-Type = discover 
18:08:59 dhcp,debug,packet     Max-DHCP-Message-Size = 1500 
18:08:59 dhcp,debug,packet     Host-Name = "ThemoAC138E" 
18:08:59 dhcp,debug,packet     Parameter-List = Subnet-Mask,Router,Broadcast-Address,Domain-Server,Domain-Name,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Router-Discovery,Static-Route,Classless-Route,Vendor-Specific 
18:08:59 dhcp,info IoT_dhcp deassigned 10.10.30.3 from 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet IoT_dhcp sending offer with id 16829867 to 10.10.30.3 
18:08:59 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:08:59 dhcp,debug,packet     yiaddr = 10.10.30.3 
18:08:59 dhcp,debug,packet     siaddr = 10.10.30.1 
18:08:59 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet     Msg-Type = offer 
18:08:59 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:08:59 dhcp,debug,packet     Address-Time = 21600 
18:08:59 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
18:08:59 dhcp,debug,packet     Router = 10.10.30.1 
18:08:59 dhcp,debug,packet     Domain-Server = 10.10.30.1,192.98.49.8,192.98.49.9 
18:08:59 dhcp,debug,packet IoT_dhcp received request with id 16829867 from 0.0.0.0 
18:08:59 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:08:59 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet     Msg-Type = request 
18:08:59 dhcp,debug,packet     Max-DHCP-Message-Size = 1500 
18:08:59 dhcp,debug,packet     Address-Request = 10.10.30.3 
18:08:59 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:08:59 dhcp,debug,packet     Parameter-List = Subnet-Mask,Router,Broadcast-Address,Domain-Server,Domain-Name,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Router-Discovery,Static-Route,Classless-Route,Vendor-Specific 
18:08:59 dhcp,debug,packet     Host-Name = "ThemoAC138E" 
18:08:59 dhcp,info IoT_dhcp assigned 10.10.30.3 to 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet IoT_dhcp sending ack with id 16829867 to 10.10.30.3 
18:08:59 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:08:59 dhcp,debug,packet     yiaddr = 10.10.30.3 
18:08:59 dhcp,debug,packet     siaddr = 10.10.30.1 
18:08:59 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:08:59 dhcp,debug,packet     Msg-Type = ack 
18:08:59 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:08:59 dhcp,debug,packet     Address-Time = 21600 
18:08:59 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
18:08:59 dhcp,debug,packet     Router = 10.10.30.1 
18:08:59 dhcp,debug,packet     Domain-Server = 10.10.30.1,192.98.49.8,192.98.49.9 
18:09:15 dhcp,debug,packet IoT_dhcp received discover with id 16829867 from 0.0.0.0 
18:09:15 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:09:15 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet     Msg-Type = discover 
18:09:15 dhcp,debug,packet     Max-DHCP-Message-Size = 1500 
18:09:15 dhcp,debug,packet     Host-Name = "ThemoAC138E" 
18:09:15 dhcp,debug,packet     Parameter-List = Subnet-Mask,Router,Broadcast-Address,Domain-Server,Domain-Name,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Router-Discovery,Static-Route,Classless-Route,Vendor-Specific 
18:09:15 dhcp,info IoT_dhcp deassigned 10.10.30.3 from 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet IoT_dhcp sending offer with id 16829867 to 10.10.30.3 
18:09:15 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:09:15 dhcp,debug,packet     yiaddr = 10.10.30.3 
18:09:15 dhcp,debug,packet     siaddr = 10.10.30.1 
18:09:15 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet     Msg-Type = offer 
18:09:15 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:09:15 dhcp,debug,packet     Address-Time = 21600 
18:09:15 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
18:09:15 dhcp,debug,packet     Router = 10.10.30.1
18:09:15 dhcp,debug,packet     Domain-Server = 10.10.30.1,192.98.49.8,192.98.49.9 
18:09:15 dhcp,debug,packet IoT_dhcp received request with id 16829867 from 0.0.0.0 
18:09:15 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:09:15 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet     Msg-Type = request 
18:09:15 dhcp,debug,packet     Max-DHCP-Message-Size = 1500 
18:09:15 dhcp,debug,packet     Address-Request = 10.10.30.3 
18:09:15 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:09:15 dhcp,debug,packet     Parameter-List = Subnet-Mask,Router,Broadcast-Address,Domain-Server,Domain-Name,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Router-Discovery,Static-Route,Classless-Route,Vendor-Specific 
18:09:15 dhcp,debug,packet     Host-Name = "ThemoAC138E" 
18:09:15 dhcp,info IoT_dhcp assigned 10.10.30.3 to 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet IoT_dhcp sending ack with id 16829867 to 10.10.30.3 
18:09:15 dhcp,debug,packet     ciaddr = 0.0.0.0 
18:09:15 dhcp,debug,packet     yiaddr = 10.10.30.3 
18:09:15 dhcp,debug,packet     siaddr = 10.10.30.1 
18:09:15 dhcp,debug,packet     chaddr = 84:0D:8E:AC:13:8E 
18:09:15 dhcp,debug,packet     Msg-Type = ack 
18:09:15 dhcp,debug,packet     Server-Id = 10.10.30.1 
18:09:15 dhcp,debug,packet     Address-Time = 21600 
18:09:15 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
18:09:15 dhcp,debug,packet     Router = 10.10.30.1 
18:09:15 dhcp,debug,packet     Domain-Server = 10.10.30.1,192.98.49.8,192.98.49.9

And MT configuration parts for this VLAN. I’m using RouterOS 6.47.1 but this problem was also with earlier software versions. Problematic devices IP addresses are ending with .3, .4 and .5.

/interface bridge
add name=IoT_bridge
/interface vlan
add interface=Switch_bonding name=IoT_vlan vlan-id=30
/ip pool
add name=IoT_pool ranges=10.10.30.2-10.10.30.254
/ip dhcp-server
add address-pool=IoT_pool disabled=no interface=IoT_vlan lease-time=6h name=IoT_dhcp
/ip address
add address=10.10.30.1/24 interface=IoT_vlan network=10.10.30.0
/ip dhcp-server lease
add address=10.10.30.2 mac-address=C8:DB:26:09:56:98 server=IoT_dhcp
add address=10.10.30.3 mac-address=84:0D:8E:AC:13:8E server=IoT_dhcp
add address=10.10.30.4 mac-address=CC:50:E3:37:FA:D3 server=IoT_dhcp
add address=10.10.30.5 mac-address=CC:50:E3:37:FA:BB server=IoT_dhcp
add address=10.10.30.6 mac-address=60:01:94:06:E3:77 server=IoT_dhcp
/ip dhcp-server network
add address=10.10.30.0/24 gateway=10.10.30.1

I had a smart device that was doing the same thing, for whatever reason it had become confused and after rejoining it to the network through the smart device process its no longer an issue.
Also consider lengthening the time on leases for smart devices if possible.

hi

pardon my iterjecting.
Have you ever found the cause of this behavior?
I have the same problem

Thanks