How to reverse RBM33G WAN and LAN ports?

The RBM33G board has a PoE port, however, its defaulted to eth1 which is the WAN port. I'd like to power it via a Mikrotik PoE Switch I have and reverse the WAN port. Is this possible? Eth1 to Switch, Eth3 to upstream ISP router or modem?

Have you tried re-configuring the switch using LuCI or /etc/config/network yet?

It looks like a "standard" single-Ethernet configuration from https://openwrt.org/toh/mikrotik/mikrotik_rbm33g#network_interfaces

No I have not yet @jeff not sure how to start, the switch config gui in Luci I'm still trying to wrap my head around regarding the tagging.

If you post the switch-related sections from /etc/config/network, the changes should be easy to make with a text editor, either on the device, or uploading a revised version.

1 Like

Awesome Jeff thanks!

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option dns '8.8.8.8 8.8.4.4'
	option delegate '0'
	option type 'bridge'
	option stp '1'
	option ifname 'eth0.1'
	option ipaddr '192.168.169.1'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr 'xxxxx'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option delegate '0'

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr 'xxxx'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option auto '0'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 6t'
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0 6t'
	option vid '2'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '3'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '4'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '5'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '6'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option vid '7'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '8'
	option vid '8'
	option ports '1t 2t 3t 4t 6t'

config switch_vlan
	option device 'switch0'
	option vlan '9'
	option vid '9'
	option ports '1t 2t 3t 4t 6t'

You've got VLANs 3-9 defined. This is unusual. What function do they provide?

There are also only three jacks on the device, from what I read, so I'm surprised to see six defined (seven, if you count the CPU). Is this an "old" config that was upgraded from an older major version?

Based on the hardware description on the ToH (which hopefully is the proper device), I'd expect to see (after edits) something like:

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

config switch_vlan
	option device 'switch0'
	option vlan '1'           # matches eth0.1 for LAN interface
	option ports '0 1 6t'     # existing "WAN" socket and one "LAN" socket to/from CPU
	option vid '1'            # (likely redundant as default for VLAN should be 1 already)

config switch_vlan
	option device 'switch0'
	option vlan '2'           # matches eth0.2 for WAN interface
	option ports '2 6t'       # remaining "LAN" socket 
	option vid '2'            # (as above)

6t (tagged) because the CPU needs to know if the packet is for/from LAN or WAN and it uses as single Ethernet interface
0 1 2 untagged since, for most people, the connected equipment isn't VLAN-aware

Edit: There's no harm in leaving the vid lines in. I usually explicitly define vid and pvid as that way the config is totally clear to me.

1 Like

Thanks Jeff! I'll try this later this evening. Regarding the config file number of ports, the board has USB, 2 x miniPCIe, and a few other hardware interfaces as well as the Ethernet ports. I've created a number of vlans to accomodate a client whom has 7 separate networks at this time, WiFI and Ethernet Switch.

Jeff, I think I'm making this a lot more complicated that it needs to be in a 2 OpenWrt scenario with two RBM33Gs (One in dumb AP mode, the other in Router Only mode).

I've been having a heck of time getting the dumb AP right, have locked myself out a couple of times. It looks like there is no need to reverse the WAN ports.

What I'd like to do is have the WAN port on the dumb AP be the only port plugged into the network as its PoE. The WAN port also act at the maintenance port having a static IP assigned to it.

Next have the Router Only internet gateway RBM33G board have a maintenance LAN port able to communicate with the dumb AP WAN Port which has a maintenance network IP assigned to it.