I tried to assign static ip via dhcp lease settings.
I entered the mac id, entered static ip, selected dhcp server that i originally preffered(if the vlan was correct), nothing got assigned
Esentially i am fine if i can assign the correct static ip to the new device, but for some reason, i think because vlans dont match with the dhcp server vlan, static ip doesnt work
I am lost again. You said that the VLAN ID is the same for the packets from the AP itself and for the packets from that "other device", so they land on the same
/interface vlan in Mikrotik.
For DHCP, some devices use client-id built from their MAC address and some build it from different property of theirs (like serial number). So the easiest way is not to prepare the lease in advance, but to let the device get an automatically generated lease, and then use
/ip dhcp-server lease make-static to convert it to a manual one, and change the
address value in the manual one to what you need; it may even not be a single address, you can use a pool name as
address
But the lease must stay linked to the server which listens on the DHCP server bound to that
/interface vlan through which the device is connected, and if packets should reach that device via that interface, you have to either add the corresponding subnet to that interface (which you can only do if the same subnet is not attached to another one), or you must add a route with the device's IP address as
dst-address and the
/interface vlan as
gateway. Plus in order that the device was able to send data, it needs to be able to resolve the address of the gateway using ARP, so you'd need some bridge nat rules.. so a /30 subnet attached to the
/interface vlan and a corresponding
/ip dhcp-server network profile are probably a better way of dealing with it.
To get a better answer, you have to describe the complete use case (if you plan to assign an IP address from some subnet to that specfic device, what else is connected to that subnet and how).
However, I'd assume it to be much easier to permit VLAN tagging on the Unifi? The "other device" is connected to one Ethernet port of the AP, the TPlink to the other one. The management of Unifi is in VLAN A, the wireless interface is in VLAN B, the TP-link tags/untags VLAN C and lets A and B through transparently. Unifi forwards tagless packets between the ports.