Lost Unifi switch management interface


I just created a management vlan for all my AP and switches. I have set a static IP address on the switch that correspond to the new vlan subnet. I have now lost access to the switch in the unifi controller because I forgot to also changed the management vlan in the interface. So I now have a static IP address from vlan5 but the the management vlan is still on my other vlan1 on a different subnet.

I can ssh to the unifi switch on the new static IP I have set so I was wondering if there is a cli command I can run or a file to edit in order to set the correct management vlan?

Thank you

@mcury thank you for pointing me to the righ direction. I couldn’t get the command to run at first but then saw that post and got it to work. The steps are easy:

  1. ssh to the switch
    ssh ubnt@
  2. type the command cli to enter the config menu
  1. type enable to edit the config
  1. set the management vlan
network mgmt_vlan 5

I got my switch back in the unifi controller :slight_smile:

1 Like