✔ 最佳答案
Both have different purposes!
The router is made to route traffic, so it can manage two or more interfaces, typically LAN (local) and WAN (Internet).
The fact that it makes the connection between the two interfaces justifies the extra security included.
The ethernet switch is called that way because all it does is switch traffic from one port to another.
You don't mention it, but to clarify things further, a hub should be mentioned. The hub is the precursor of the switch and does not channel information to the right port, but actually broadcasts it on all of them.
Most router act like hubs on the LAN side, which is why a switch is more efficient if you have a lot of local traffic.
In conclusion, depending on your requirements, you could sometimes benefit from having both a router and a switch even if the router offers enough ports to suit your needs.