@alzhao thanks for your prompt reply. By default there’s no switch configured on OpenWrt 21.02.1:

root@ar300m:~# cat /etc/config/network

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

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'
	list ports 'eth1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.226.1'
	option ipv6 '0'

Here’s the command you requested with cable plugged into LAN port:

root@ar300m:~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 0
	ar8xxx_mib_poll_interval: 500
	ar8xxx_mib_type: 0
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	mirror_monitor_port: 0
	mirror_source_port: 0
	arl_table: address resolution table
Port 0: MAC 94:83:c4:0e:d7:d1
Port 1: MAC 00:25:00:ed:20:6b

Port 0:
	mib: MIB counters
RxGoodByte  : 343980 (335.9 KiB)
TxByte      : 454574 (443.9 KiB)

	pvid: 0
	link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
	mib: MIB counters
RxGoodByte  : 454540 (443.8 KiB)
TxByte      : 344166 (336.0 KiB)

	pvid: 0
	link: port:1 link:up speed:100baseT full-duplex auto
Port 2:
	mib: No MIB data
	pvid: 0
	link: port:2 link:down
Port 3:
	mib: No MIB data
	pvid: 0
	link: port:3 link:down
Port 4:
	mib: No MIB data
	pvid: 0
	link: port:4 link:down

Here’s the command you requested with cable plugged into WAN port:

root@ar300m:~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 0
	ar8xxx_mib_poll_interval: 500
	ar8xxx_mib_type: 0
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	mirror_monitor_port: 0
	mirror_source_port: 0
	arl_table: address resolution table
Port 0: MAC 00:25:00:ed:20:6b
Port 0: MAC 94:83:c4:0e:d7:d1

Port 0:
	mib: MIB counters
RxGoodByte  : 350022 (341.8 KiB)
TxByte      : 456936 (446.2 KiB)

	pvid: 0
	link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
	mib: MIB counters
RxGoodByte  : 456552 (445.8 KiB)
TxByte      : 347224 (339.0 KiB)

	pvid: 0
	link: port:1 link:down
Port 2:
	mib: No MIB data
	pvid: 0
	link: port:2 link:down
Port 3:
	mib: No MIB data
	pvid: 0
	link: port:3 link:down
Port 4:
	mib: No MIB data
	pvid: 0
	link: port:4 link:down

As you can see when cable is plugged into WAN, I get the following output from swconfig:

Port 0: MAC 00:25:00:ed:20:6b
Port 0: MAC 94:83:c4:0e:d7:d1

Is the switch configuration section missing from the network config on this device in OpenWrt 21.02.1? How is switch configured with your own firmware?