Nevertheless, if the designing and building effort is neglected, I assume that the total cost of the hardware might be under $100, which is less than a computer with multiple interfaces would cost.
Still, 1 Gb/s networks are rather obsolete. One could make a managed network switch that is bigger and faster by using only off-the-shelf components for slightly more than $200, e.g. a 6-port 2.5 Gb/s switch can be made with an Odroid H4+ having 2 ports, together with its add-on M.2 card with 4 extra Ethernet ports. Another variant is to use a small computer with an N100 CPU and 4 2.5 Gb/s ports, which can be bought in this price range from various Chinese companies. Similar small computers with 6 2.5 Gb/s ports are a little more expensive, perhaps slightly over $300.