VLAN config on second switch via trunk — SOM + SwitchBlox Rugged

Hi all,

I have the following hardware setup:

  • 1x Rugged SOM (BB-SOM-A-1) stacked on 1x SwitchBlox Rugged (BB-SWR-G-1) — running OpenWRT

  • 1x second SwitchBlox Rugged (BB-SWR-G-1) connected to Switch 1 via a trunk link (PicoBlade → RJ45 coupler → RJ45 → PicoBlade)

  • 1x Arduino (Rugged MEGA) connected to a port on Switch 1

  • 4x identical devices connected one per port on Switch 2

  • External ethernet uplink into Switch 1

My goal:

  • Assign each port on Switch 2 to its own VLAN (VLAN 10, 20, 30, 40) to identify which device is talking, since all 4 devices run identical firmware and send to the same multicast address

  • Have the SOM route each VLAN’s traffic to a unique IP so the Arduino can identify which device it’s receiving from

  • The trunk link between Switch 1 and Switch 2 carries all 4 VLANs tagged

Questions:

  1. How do I configure the trunk port on Switch 1 in OpenWRT to carry VLANs 10/20/30/40 tagged to Switch 2?

  2. How do I assign each port on Switch 2 to its respective VLAN from the SOM — does Switch 2 appear as additional lan interfaces in OpenWRT?

  3. What is the recommended way to route VLAN 10 → 192.168.10.x, VLAN 20 → 192.168.20.x etc. so the Arduino sees each device on a distinct IP?

Current ifconfig output shows br-lan on lan1-lan4 with lan5 as WAN. Basic connectivity is working, I can ping the SOM at 192.168.2.1.

Any help appreciated, attaching a diagram.

I’ll split this answer into two parts so it also covers the 3rd question

  1. You want to create VLAN devices on the bridge device br-lan

Within LuCI web GUI navigate to

`Network ->Interfaces → Devices → br-lan → configure`

Enable Bridge VLAN filtering and add 4 VLANs for VLAN ID 10, 20, 30, 40. Ensure you set the packets to ‘Tagged’ for all of them on the trunk port you specified. You still want to add other ports as untagged if you want other access ports but this would be the minimum you need for a trunk port

  1. Assign IP interfaces to these vlan devices.

Navigate to Network → Interfaces → Interfaces → add new interface

Protocol: static
Device: br-lan.10, and so on for all VLAN devices

You can then set the IP address and gateway for each VLAN interface.

I’ve attached some screenshots to show what this should look like.

Given that Switch 2 is an unmanaged SwitchBlox Rugged on its own, you cannot configure VLANs on this device as is. However, you have a couple of options here.

  1. You could use another Rugged SOM with switch 2 to make it managed and configure the access VLANs
  2. You could use the other ports on Switch 1 to create 4 access VLANs and connect the Arduino to the other ports. However, you mentioned that you also have an upstream so this is 6 connections, which won’t fit on a single 5 port SWR

Given you are using multicast, I would also suggest enabling IGMP snooping on the bridge interface
`Network → Interfaces → Devices → br-lan`
Check Enable IGMP snooping