[SOLVED] Switch menu, how to configure OpenWrt

I am running OpenWrt virtualized.
I have 6 nics in total. eth0 for LAN, eth1 for WAN
and eth2 through eth5 to configure as switch.

but the switch menu under network in LUCI does not appear.

I have added the following section to the /etc/config/network

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

Are there any more steps I should take to have the switch menu appear in LUCI?

Get a device with a hardware switch.

1 Like

you do realize that this is the public OpenWrt forum?

This is no place to make snark comments

I have a hardware switch

It's not a snark comment, it's what you need to do to get a switch menu in LuCi.

The switch menu is for devices with a dedicated embedded switch. If your system just has „a bunch of NICs“ (which also includes e.g. multi port GbE cards) then resort to bridge VLANs. You can configure those in the device settings.

See the various „DSA“ related VLAN howtos.

To configure a „virtual switch“, declare a new bridge device containing eth2..eth5, then enable bridge VLANs on it. Since every device in OpenWrt needs a logical network using it for it to get brought up by netifd, also declare an unmanaged (or static IP) dummy network interface using the bridge device.

1 Like

If you don’t have a hardware switch, you will not have a switch menu or any switch functions.

You say you have 6 virtualized ports. I understand the value of two (lan and wan), but what do you need the other ports for? Are they all supposed to be in the same L2 network? If so l, just create a bridge that contains eth2-5

Edit: I see the picture. Those are physical ports, not virtual. Now it makes more sense. A bridge containing all the ports you want to operate together. A bridge is the software equivalent to an unmanaged hardware switch.

2 Likes

yes and no.
The host system is running a KVM OpenWrt VM.

I have bridged all NIC ports separately and given them as a network device to OpenWrt.

One would think passing through the hardware directly to the VM would be better but I tried and failed and also I realize that that might not be for utmost flexibility,.

I have had my hopes set on having a switch menu in LUCI. I am willing to poke around a lot more if that desired outcome is possible.

But if it is not feasible then I will rethink my strategy.

Is it feasible?

Without wanting to sound 'snarky', no. You need a device with a proper hardware switch.

2 Likes

I still love you brother. Don't worry if I sometimes snap :wink:

4 Likes

you Sir are a rockstar

this is sooo cool

btw if I may ask. What software did you use to record the vid? that is such a powerful communication tool

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.