Help needed: Making a $20 Network Switch

Started by xavierwood, December 27, 2024, 10:28:09 AM

Previous topic - Next topic
At work, I want to make a simple switch by using OPNsense on these mini computers with LAN ports on. There are many, but not used at the company.

It is intended to be a network switch and a really simple one, like the one you can buy for $20. I know it is not power efficient, but that is okay. At least, these mini computers can be useful again.

I'm a newbie to networking. I already install OPNsense on one of these mini computers but don't know how to set it up to be a switch.
I tried but failed. I don't need it to run firewall, dhcp, and routing, just need it to be a cheap switch, which I can connect a couple of devices to and use the internet.

This is a fabulous way to get fired, by using a switch on someone else's network. :D

Also, you may want to google what a switch really is, before you try to make one. :D

Quote from: lilsense on December 27, 2024, 11:03:16 AMThis is a fabulous way to get fired, by using a switch on someone else's network. :D

Also, you may want to google what a switch really is, before you try to make one. :D
three are switches, which connect to computers in the office. When I add one more simple switch, what is the problem going to be? I wanna build a switch not a router, I don't think that is going to mess anything up as long as I'm allowed to have multiple devices (computers).

Leaving aside the "why on earth would you want to do that?" question; you could configure a bridge on OPNsense, with multiple NICs as members, and disable filtering on the bridge, which would effectively implement a software ethernet switch. https://docs.opnsense.org/manual/how-tos/lan_bridge.html


Don't use OPNsense, just install FreeBSD, configure a bridge across all ports, done.

Make sure to never connect more than one port to the rest of the network or you won't be making friends ;-)
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Yeah; it's going off-topic a bit, but I was going to say that if you want to try to get fancy with it, you could look at Open vSwitch. I'd probably use Linux, but it appears to be supported on FreeBSD too.

December 31, 2024, 07:28:50 AM #6 Last Edit: December 31, 2024, 07:30:25 AM by xavierwood
Quote from: dseven on December 27, 2024, 11:44:11 AMLeaving aside the "why on earth would you want to do that?" question; you could configure a bridge on OPNsense, with multiple NICs as members, and disable filtering on the bridge, which would effectively implement a software ethernet switch. https://docs.opnsense.org/manual/how-tos/lan_bridge.html


This helps, thanks. However, I found that assigning Bridge to LAN won't make it a switch. What I did was assigned ports to OPTx and bridged these OPTs and assigned one WAN to connect to the company network. In the mini computers, there are 5 Ethernet ports, I assigned 4 ports to OPT and one to WAN. I plugged WAN to company network and the rest can connect to other devices. this way I can access the Web GUI to manage OPNsense.

I guess, they can all be assigned to OPTs. I mean all the 5 ports, but you will have no management access to the Web GUI, but using a console port to manage it in text mode, but most people don't fit in the scenario.



So you say yourself you want a switch, yet insist on using OPNsense (OPNsense is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform)...

How about listening to the advice you're given?
Patrick has decades of experience in this space. You think you know better?

Bridging in FreeBSD
QuoteIn many respects, a bridge is like an Ethernet switch with very few ports.
In your case, you'll get a 5-port switch.

Wait!!!!! WHAT????????????

your 4 port mini PC is $20???????? WHERE?????