Community discussions

MikroTik App
 
AdamKlobukowski
just joined
Topic Author
Posts: 5
Joined: Thu May 07, 2020 9:13 pm

DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 11:24 am

Hello

I have 2 MikroTik devices:
1) RouterBOARD 962UiGS-5HacT2HnT on fw 6.46.6 that is connected to 'the internet', and acts as a DHCP server to my local network (wifi and ethernet)
2) RBcAPGi-5acD2nD r2 on fw 6.46.6 that is connected to 1) via ethernet (and 2 switches inbetween), that acts as an extender of my wifi network coverage (my devices can connect to this AP (verified by 2 MAC and output of 'netsh wlan show interfaces' command on Windows client), and they sucessfully get DHCP leases from 1 via connection to 2).

DHCP works for all my devices.... except for 2: it can't/won't get lease from 1).

I enabled dhcp logs on both devices and this is whats there:
Logs from 1:
10:10:05 dhcp,debug,packet defconf received discover with id 919903405 from 0.0.0.0 
10:10:05 dhcp,debug,packet     secs = 2 
10:10:05 dhcp,debug,packet     flags = broadcast 
10:10:05 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:05 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:05 dhcp,debug,packet     Msg-Type = discover 
10:10:05 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
10:10:05 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
10:10:05 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
10:10:05 dhcp,debug,packet defconf sending offer with id 919903405 to 255.255.255.255 
10:10:05 dhcp,debug,packet     flags = broadcast 
10:10:05 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:05 dhcp,debug,packet     yiaddr = 192.168.0.11 
10:10:05 dhcp,debug,packet     siaddr = 192.168.0.1 
10:10:05 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:05 dhcp,debug,packet     Msg-Type = offer 
10:10:05 dhcp,debug,packet     Server-Id = 192.168.0.1 
10:10:05 dhcp,debug,packet     Address-Time = 600 
10:10:05 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
10:10:05 dhcp,debug,packet     Router = 192.168.0.1 
10:10:05 dhcp,debug,packet     Domain-Server = 192.168.0.1,192.168.1.1 
10:10:08 dhcp,debug,packet defconf received discover with id 919903405 from 0.0.0.0 
10:10:08 dhcp,debug,packet     secs = 5 
10:10:08 dhcp,debug,packet     flags = broadcast 
10:10:08 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:08 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:08 dhcp,debug,packet     Msg-Type = discover 
10:10:08 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
10:10:08 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
10:10:08 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
10:10:08 dhcp,debug,packet defconf sending offer with id 919903405 to 255.255.255.255 
10:10:08 dhcp,debug,packet     flags = broadcast 
10:10:08 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:08 dhcp,debug,packet     yiaddr = 192.168.0.11 
10:10:08 dhcp,debug,packet     siaddr = 192.168.0.1 
10:10:08 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:08 dhcp,debug,packet     Msg-Type = offer 
10:10:08 dhcp,debug,packet     Server-Id = 192.168.0.1 
10:10:08 dhcp,debug,packet     Address-Time = 600 
10:10:08 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
10:10:08 dhcp,debug,packet     Router = 192.168.0.1 
10:10:08 dhcp,debug,packet     Domain-Server = 192.168.0.1,192.168.1.1 
10:10:09 dhcp,debug,packet defconf received discover with id 919903405 from 0.0.0.0 
10:10:09 dhcp,debug,packet     secs = 6 
10:10:09 dhcp,debug,packet     flags = broadcast 
10:10:09 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:09 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:09 dhcp,debug,packet     Msg-Type = discover 
10:10:09 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
10:10:09 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
10:10:09 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
10:10:09 dhcp,debug,packet defconf sending offer with id 919903405 to 255.255.255.255 
10:10:09 dhcp,debug,packet     flags = broadcast 
10:10:09 dhcp,debug,packet     ciaddr = 0.0.0.0 
10:10:09 dhcp,debug,packet     yiaddr = 192.168.0.11 
10:10:09 dhcp,debug,packet     siaddr = 192.168.0.1 
10:10:09 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
10:10:09 dhcp,debug,packet     Msg-Type = offer 
10:10:09 dhcp,debug,packet     Server-Id = 192.168.0.1 
10:10:09 dhcp,debug,packet     Address-Time = 600 
10:10:09 dhcp,debug,packet     Subnet-Mask = 255.255.255.0 
10:10:09 dhcp,debug,packet     Router = 192.168.0.1 
10:10:09 dhcp,debug,packet     Domain-Server = 192.168.0.1,192.168.1.1 
(aaand it loops)

Logs from 2:
21:09:31 dhcp,debug,packet     flags = broadcast 
21:09:31 dhcp,debug,packet     ciaddr = 0.0.0.0 
21:09:31 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
21:09:31 dhcp,debug,packet     Msg-Type = discover 
21:09:31 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
21:09:31 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
21:09:31 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
21:09:36 dhcp,debug,packet dhcp-client on bridge sending discover with id 1274023558 to 255.255.255.255 
21:09:36 dhcp,debug,packet     secs = 51 
21:09:36 dhcp,debug,packet     ciaddr = 0.0.0.0 
21:09:36 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
21:09:36 dhcp,debug,packet     Msg-Type = discover 
21:09:36 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
21:09:36 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
21:09:36 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
21:09:42 dhcp,debug,packet dhcp-client on bridge sending discover with id 1274023558 to 255.255.255.255 
21:09:42 dhcp,debug,packet     secs = 57 
21:09:42 dhcp,debug,packet     ciaddr = 0.0.0.0 
21:09:42 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
21:09:42 dhcp,debug,packet     Msg-Type = discover 
21:09:42 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
21:09:42 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
21:09:42 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
21:09:46 dhcp,debug,packet dhcp-client on bridge sending discover with id 1274023558 to 255.255.255.255 
21:09:46 dhcp,debug,packet     secs = 61 
21:09:46 dhcp,debug,packet     ciaddr = 0.0.0.0 
21:09:46 dhcp,debug,packet     chaddr = C4:AD:34:F5:6E:7E 
21:09:46 dhcp,debug,packet     Msg-Type = discover 
21:09:46 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
21:09:46 dhcp,debug,packet     Host-Name = "MikrotTik-adamk" 
21:09:46 dhcp,debug,packet     Client-Id = 01-C4-AD-34-F5-6E-7E 
21:09:47 system,info,account user admin logged in via local 
21:09:53 dhcp,debug,packet dhcp-client on bridge sending discover with id 297260126 to 255.255.255.255 
(aaand it loops)

What is wrong here and how to fix it?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 12:14 pm

Maybe you have started your configuration of #2 by copying a backup of #1 into it? NEVER do that with MikroTik!
Also, it is time that you upgrade your RouterOS. Latest v6 version is 6.49.7
 
AdamKlobukowski
just joined
Topic Author
Posts: 5
Joined: Thu May 07, 2020 9:13 pm

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 12:19 pm

I did not copy the configuration.

According to what I see on "RouterBoard" config page, 6.46.6 is the latest offered for my devices. Should I download and manally upgrade?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 12:30 pm

You should first go to System->Packages and "Check for Updates" and "Download & Install", that will reboot the system.
Then go to System->RouterBoard and do "Upgrade" and reboot again (when convenient).

Is the DHCP client on the ethernet port or on the bridge which contains the ethernet port and the wifi interface? (should be the latter)
 
AdamKlobukowski
just joined
Topic Author
Posts: 5
Joined: Thu May 07, 2020 9:13 pm

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 6:24 pm

I've updated both devices to 6.49.7 and there is no change in behaviour... but...

During tinkering with the setup I've connected devices directly (not through switches) aaaand it happily got DHCP lease. I reconnected it again through switches - I get no lease as before.

I do not think that switches are a problem (other devices get DHCP lease without problems).

I also did configuration reset on 2).
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 7:50 pm

That is strange, switches normally do not affect DHCP unless they are very advanced and someone has (incorrectly) configured something like "DHCP snooping" on them.
(that includes configuration of a "trusted DHCP server", usually by MAC address and port, probably separate per VLAN)

It is common to have DHCP problems when there is a WiFi link between the clients and the server, and this WiFi link is not operating in 4-address mode (WDS, station bridge).
But with plain cabling there should be no such issue.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: DHCP problem between 2 MikroTik devices

Tue Mar 28, 2023 8:07 pm

This does sound strange.

The only thing I can suggest is setting netmask (in /ip/dhcp-server/network) to your subnet size (e.g. 24) might be worth a shot. Although the docs say 0 should use the subnet from the network, in past I've seen this not being set cause client to not pickup an address.
 
AdamKlobukowski
just joined
Topic Author
Posts: 5
Joined: Thu May 07, 2020 9:13 pm

Re: DHCP problem between 2 MikroTik devices

Wed Mar 29, 2023 9:16 am

I solved the problem.

On 2) I had ethernet set up with bridge - and that setting prevented DHCP to work correctly. I removed the bridge, and now it's all good.

Thanks for everyone that took time to help me with this problem.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: DHCP problem between 2 MikroTik devices

Wed Mar 29, 2023 2:34 pm

Note to pe1chl and ammo........... dont forget your ABCs......
viewtopic.php?p=908118

Or NOT, if you like playiing whackamole and guessing games. ;-P

Who is online

Users browsing this forum: donkeyKong, ItchyAnkle, Soleous75 and 87 guests