Switch ports on a router/firewall

I’m going to run out of ports in my home network rack, and I’m out of rack space (I’m not an IT Pro). I considered upgrading to a 48 port switch, but it won’t fit (too deep, my rack is on a wall).

My router/firewall is connected to a 24 port switch. I use typical home networking VLANs (guest, trusted, work, kids, IOT, etc).

From there, devices are either directly connected to the 24 port switch (servers, etc) or a single smaller switch is connected to the 24 port router (switch behind a TV, etc). There are no 3-switch hops in the network.

I understand that it’s generally frowned upon to use the switch ports on the router. Is there a circumstance where it’s okay? Everything is going back through the router anyway to process VLANs.

It’s your environment and it’s up to you how you want to run it. If you find it acceptable to run then do it.

If it were me, I’d future proof my setup. I also started out with a 24 port switch and thought I wouldn’t use them all. And surprise, I was wrong.

Maybe search for a 48 port layer 2 switch that will fit in your rack?

I’m trying to stay with Unifi. Problem is I also need PoE.

It doesn’t seem as clean, but I don’t understand the downfalls of using the router’s built-in LAN ports?