I am reinstalling my Unifi Controller on Docker and need to re-adopt my Unifi AP devices. There are several ways to do this:
- Hard reset your device with a staple
- SSH into the device and reset via a command
- Forget the device in the Unifi Controller (was never an option for me, but seems possible for others)
With option 1, I ran into the issue that my network is different from the default one that a Unifi AP resets to (default IP = 192.168.1.20) and I wanted a way to change that back to the fixed IP address it had before. Thanks to this article for some help. Later on, it turned out there was even a more convenient way for me to do this, see below.
- Reset your Unifi AP device with a staple by pressing the Reset button. When it concerns a switch, follow the special procedure which requires to unplug the power cord and UTP cables, see more information here.
- Provide a laptop where you can change the Ethernet IP to a fixed on e.g. 192.168.1.2 (has to be in the 192.168.1.x/24 range) and connect the laptop with your Unifi AP or switch directly through an UTP cable
- SSH into the Unifi AP or switch (ssh -l ubnt 192.168.1.20) with default password ubnt
- Change the config file:
- Save your file and wait
vi /etc/udhcpc/udhcpcFrom:
UDHCPC_FALLBACK_IP="192.168.1.20"UDHCPC_FALLBACK_NETMASK="255.255.255.0"
Into:
UDHCPC_FALLBACK_IP="NEW_IP"UDHCPC_FALLBACK_NETMASK="255.255.255.0"
Unfortunately, this did not work 100% for one of my switches, so I searched for a better way.
Now, option 2 is even better and didn't require me to unplug the device and work with 2 UTP cables.
- Check in the Unifi Controller for the listed devices that still need to be adopted
- SSH into the device with you known (old) admin account and password
- Reset the device configuration
set-default
- Wait for the device to come up again in the Unifi Controller and check it's IP address that should have changed now. Select the device and click on 'Adopt'.
- SSH into the device with this IP address and the default login: ubnt/ubnt.
- Perform an adoption via:
ping -c 4 unifi.yourdomain.com
mca-cli
set-inform http://unifi.yourdomain.com:8080/inform - Check in the Unifi Controller but normally it should start adopting or updating its configuration straight away!
No comments:
Post a Comment