Community discussions

MikroTik App
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Mikrotik DHCP issues

Mon May 15, 2023 7:28 am

I have a network with 30 devices I am using a mikrotik router that is configured as a DHCP server for all attached devices.
Lease time is 5 days
I have 3 smart outlets that refuse to connect unless the Mikrotik is rebooted daily they connect fine after a reboot.
I also have a smart TV that with the mikrotik says there is no internet on the wired connection, however it connects and works fine using a wireless connection on the mikrotik

If I unhook the Mikrotik, and hook up a netgear router everything works and connects with no issue and remains fully functional for months at least, probably for years.

Hooking up the Mikrotik the 3 outlets and the TV fail to connect.

I really want to like and use the Mikrotik because I can use some of it's other features but this failure to connect issue makes it a non starter.

I have upgraded the firmware no change, I am attaching a log file so you can see what it starts doing after a few hours or a day or so.
mik1.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Mikrotik DHCP issues

Tue May 16, 2023 3:30 pm

If you set the lease time to 1 second, that's normal...
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Re: Mikrotik DHCP issues

Wed May 17, 2023 10:46 pm

Lease time is 5 days
 
holvoetn
Forum Guru
Forum Guru
Posts: 5325
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Mikrotik DHCP issues

Wed May 17, 2023 10:56 pm

From your screenshot it looks more like 5 SECONDS.
Show the config !

BTW ...is that a recent screenshot ? Your time settings on that router are possibly completely wrong (I don't even need to know in which time zone you are, Jan 31st is already LOONG gone).
Not the first time I see DHCP issues due to completely wrong time settings on a router.
Check that one too please.
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Re: Mikrotik DHCP issues

Thu May 18, 2023 1:10 am

That is an old screenshot from earlier this year, sorry. I have attached the latest and pretty much original config. As you can see ether 5 is a different server(quantar) no problems there all the problems are on ether 2,3,4 which are bridged. Thanks for having a look UPDATE: looks like lease time is 2hours? No Idea about that home network and suggestions?

# may/17/2023 15:06:36 by RouterOS 7.8
# software id = ZS56-J9I0
#
# model = RB750Gr3
# serial number = xxxxxx
/interface bridge
add admin-mac=C4:AD:34:93:E6:7B auto-mac=no comment=defconf name=bridge
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=MANAGEMENT
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.1.5-192.168.1.254
add name=dhcp_pool_quantar ranges=192.168.89.10-192.168.89.110
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-time=2h name=Primary
add address-pool=dhcp_pool_quantar interface=ether5 lease-time=5d name=\
"Guest_Ether5 DHCP"
/port
set 0 name=serial0
/routing bgp template
set default disabled=no output.network=bgp-networks
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add comment=quantar interface=ether5 list=LAN
add comment=routeraccess interface=bridge list=MANAGEMENT
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=192.168.89.1/24 comment=quantar interface=ether5 network=\
192.168.89.0
add address=192.168.1.1/24 comment=Default interface=bridge network=\
192.168.1.0
add address=216.173.136.43/26 interface=ether1 network=xxx
/ip arp
add address=192.168.1.29 interface=bridge mac-address=B4:E6:2D:0D:81:DD
/ip dhcp-client
add comment=defconf disabled=yes interface=ether1
/ip dhcp-server alert
add disabled=no interface=bridge
/ip dhcp-server lease
add address=192.168.1.5 client-id=1:98:da:c4:83:78:bb mac-address=\
98:DA:C4:83:78:BB server=Primary
add address=192.168.1.20 client-id=1:0:1c:2a:1:73:2a mac-address=\
00:1C:2A:01:73:2A server=Primary
add address=192.168.1.27 client-id=1:98:da:c4:e7:6d:42 mac-address=\
98:DA:C4:E7:6D:42 server=Primary
add address=192.168.1.15 mac-address=B4:E6:2D:07:35:74 server=Primary
add address=192.168.1.46 client-id=1:f8:b1:56:ab:d3:6a mac-address=\
F8:B1:56:AB:D3:6A server=Primary
add address=192.168.1.26 client-id=1:34:17:eb:a5:8:9 mac-address=\
34:17:EB:A5:08:09 server=Primary
add address=192.168.1.52 client-id=1:4:a1:51:88:2a:3e mac-address=\
04:A1:51:88:2A:3E server=Primary
add address=192.168.1.37 client-id=1:2c:aa:8e:6a:87:c3 mac-address=\
2C:AA:8E:6A:87:C3 server=Primary
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf dns-server=192.168.1.1 gateway=\
192.168.1.1 netmask=24
add address=192.168.89.0/24 comment=quantar dns-server=192.168.89.1 gateway=\
192.168.89.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=xxx
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input in-interface-list=MANAGEMENT
add action=accept chain=input comment="Allow LAN DNS queries - TCP" \
connection-state=new dst-port=53 in-interface-list=LAN protocol=tcp
add action=accept chain=input comment="Allow LAN DNS queries-UDP" \
connection-state=new dst-port=53 in-interface-list=LAN protocol=udp
add action=drop chain=input comment=" drop all else"
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=accept chain=forward comment="Allow Internet " in-interface-list=\
LAN out-interface-list=WAN
add action=accept chain=forward comment="allow port forwarding" \
connection-nat-state=dstnat connection-state=new disabled=yes \
in-interface-list=WAN
add action=drop chain=forward comment=" drop All else "
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=xxx
/ip service
set telnet disabled=yes
set ftp disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
/system clock
set time-zone-name=America/Los_Angeles
/system identity
set name=NetgearMik
/system scheduler
add interval=2d name=reboot-10am on-event="/system reboot" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=feb/27/2023 start-time=10:00:00
/system upgrade upgrade-package-source
add address=192.168.1.1
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=MANAGEMENT
Last edited by waynger on Thu May 18, 2023 11:02 pm, edited 2 times in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5325
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Mikrotik DHCP issues

Thu May 18, 2023 11:58 am

1- best to post config between code quotes, much easier for reading posts.
2- best to remove your serial number and pubic IP (I can ping your gateway !!) from config export. For some, depending on how their setup is made, it can reveal the door via Mikrotik IP Cloud service. And if the firewall is not setup correctly, you could be in trouble. Not indicating this is the case here but general remark.

3- I'm not seeing anything obvious which could cause this except (and now comes a long shot) ...
I see some config bits related to OSPF. I assume you don't use it.
But it makes me remind about an issue from quite a while ago where bits and pieces from ROS6 config could have an impact on ROS7 (even when not used).
I have seen it too (also on Hex) with wireguard all of a sudden not working 100% anymore. (and the OSPF config was what I was seeing too at that time).

And here comes the long shot:
Have you ever netinstalled that device since moving to ROS7 ?
Or did you only do upgrade, upgrade, upgrade, ... ?

If you didn't, it might be worthwhile to do so. It's a bit of work but it will make sure your device is pristine-ROS7 without anything left from ROS6.
Export config, show-sensitive.
Put the file on your computer and inspect the export is complete.
Netinstall device
Import config again block by block (I'm not sure the order has been completely fixed already for simple import) making sure to omit bits and pieces which are already present unless you are 100% sure you know why you want to change that default setting.
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Re: Mikrotik DHCP issues

Thu May 18, 2023 7:14 pm

As you can tell, I am pretty green at this, thank you for the help!
I removed sensitive data from previous post.
It has always been upgrade, upgrade..
I read about net install and will go that route but I am going to wait a day or two to verify that nothing has changed with what I am running.
"I see some config bits related to OSPF"
No Idea what that is other than just reading about it, since this is a small system I assume I don't need it.
Can you point me to what you were talking about and what to remove?
Thanks again
 
holvoetn
Forum Guru
Forum Guru
Posts: 5325
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Mikrotik DHCP issues

Thu May 18, 2023 7:50 pm

Ospf
From what I can see it is disabled but the fact it is visibly there, is for me an indication something is left from before.
And then it's better to clean the house.
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Re: Mikrotik DHCP issues

Tue May 23, 2023 8:53 am

I downloaded netinstall and hooked things up however I didn't know which package to download, I am running windows 10, the only file I can get to show up in the netinstall window is for routeros-mmips and when I run it I get a "Key file too big " when I click install

Any input appreciated
Last edited by waynger on Tue May 23, 2023 9:08 am, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5325
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Mikrotik DHCP issues

Tue May 23, 2023 8:55 am

Hex is mmips architecture.
 
tangent
Forum Guru
Forum Guru
Posts: 1333
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Mikrotik DHCP issues

Tue May 23, 2023 9:02 am

something is left from before.

It’s common configuration flotsam.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5325
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Mikrotik DHCP issues

Tue May 23, 2023 9:07 am

Manually removing isn't always the solution (been there, done that).
But it may be an easier first step, that's true.
 
User avatar
waynger
just joined
Topic Author
Posts: 19
Joined: Mon May 31, 2021 10:56 pm

Re: Mikrotik DHCP issues

Tue May 23, 2023 9:10 am

Wow, thank you for the quick response, I edited my post above and am getting a key file too big error
Update, rebooted everything and it is now installing, I went back to 6.48.6 as I think that may be what was on this thing from the factory. I tried doing a reset to factory but it kept saying 7.x.x

Who is online

Users browsing this forum: No registered users and 94 guests