Skip to content

Pi4 cannot stay connected to Miktrotik hap2 AC router - lP address expires and Pi cannot rejoin until reboot #5024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
darrylgibbs opened this issue May 7, 2022 · 6 comments

Comments

@darrylgibbs
Copy link

Describe the bug

Pi4 refuses to stay connected to Mikrotik router beyond first connection. The IP address does not autorenew. It just counts down and at 0s, it falls off the network and cannot reconnect until a full system reboot.

Steps to reproduce the behaviour

I've tried 2x Mikrotik hap2 ACs running the latest RouterOS 7.2.3 Routerboard firmware and RouterOS 7.3 packages, on all interfaces. Connect the Pi to the network, OS installed on an SSD connected via USB3.0 interface. Happens with a fresh install of RPi OS Bullseye.

Device (s)

Raspberry Pi 4 Mod. B

System

Raspberry Pi reference 2022-04-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 27a8050c3c06e567c794620394a8c2d74262a516, stage2

Mar 24 2022 13:19:26
Copyright (c) 2012 Broadcom
version e5a963efa66a1974127860b42e913d2374139ff5 (clean) (release) (start)

Linux homelab 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

Logs

No response

Additional context

This started immediately after changing to the latest 64bit Bullseye OS. It also happens on the new Ubuntu 22.04 LTS for ARM. That is the only appreciable change.

@Bot123123
Copy link

What about the other APs? is it reproducible only with Microtik or with any other WiFi AP, e.g. based on the OpenWRT?

@darrylgibbs
Copy link
Author

It was happening on WIFI too, but my use case was ethernet. Sorry I didn't mention that. My rubbish ISP router managed to keep it assigned (both with static and dynamic addresses) for up to 2 days before the same thing happened.

I've now set a static IP on the Pi itself, and after 2 days, I'm seeing no issues so far. Until now, the static IP assignment was done on the router, as I always have done previously.

@seamusdemora

This comment was marked as abuse.

@darrylgibbs
Copy link
Author

darrylgibbs commented May 11, 2022

So originally had the Mikrotik router do the static IP reservation for me, and I left the Pi as defaults. This is how I've assigned static IPs on my network since getting the router without issues.

I have now set the static IP on the Pi itself using /etc/dhcpcd.conf. See my additions below:

static ip_address=192.168.88.250/24
static routers=192.168.88.1
static domain_name_servers=8.8.8.8 fd51:42f8:caae:d92e::1

@seamusdemora

This comment was marked as abuse.

@darrylgibbs
Copy link
Author

github

I agree with you, static IPs shouldn't renew, but if you look at the image from my Router, you will see what I mean. Those IP's with a D at the beginning are dynamic, and those without are static. But ALL have (at the far right) a bound (meaning it's verified as on the network and reachable) tag, and has a lease countdown from 10:00 which auto resets at 05:00 for all IP types. The Pi just counted down to 0:00 an then disappeared from the list.

Answering your questions:

  1. I did assign the static IP on the router which is also my DHCP server. The Pi itself was set to receive a dynamic address. Basically default network functionality. This is how I've always done things on all my devices. The device is just set to receive a dynamic address, but if I wanted a static IP, I just told the router to give X MAC a static IP. Further, the adblock device (in the image) is a RPi Zero v1, using an ethernet adapter. I gave that a static IP at the router level, and it works flawlessly.
  2. Yeah so far it's all rainbows and butterflies. Working fine.

I've used static IPs for this Pi4 since it is my home server running a bunch of different services, (samba shares, a variety of docker containers etc) so I want the address as static so that things wouldn't just break if one day a new IP address was given to the device. But, even dynamic addresses were not be renewed, so I really don't know what is going on.

I think I will wait for the patch to come from official sources. I know enough to see there is an issue and most likely find what it is, but I' daft enough that I will likely break something instead of fixing it.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants