How can I use the WAN port on BT HomeHub 3A

BT HH3A has 1 DSL port, 1 WAN ethernet port, 4 LAN ethernet ports. The default configuration seems to use the DSL port for Internet access, but I want to use the WAN ethernet port instead, how can I do that? The default configuration is as follows:

Version:

Reboot (17.01.1, r3316-7eb58cf109)`

Config:

root@LEDE:~# cat /etc/board.json
{
	"model": {
		"id": "BTHOMEHUBV3A",
		"name": "BT Home Hub 3A"
	},
	"led": {
		"wifi": {
			"name": "wifi",
			"type": "trigger",
			"sysfs": "bthomehubv3a:blue:wireless",
			"trigger": "phy0tpt"
		},
		"internet": {
			"name": "internet",
			"type": "netdev",
			"sysfs": "bthomehubv3a:blue:broadband",
			"device": "nas0",
			"mode": "link tx rx"
		}
	},
	"network": {
		"lan": {
			"ifname": "eth0",
			"protocol": "static",
			"macaddr": "XX:XX:XX:XX:XX:X0"
		},
		"wan": {
			"ifname": "nas0",
			"protocol": "pppoe",
			"macaddr": "XX:XX:XX:XX:XX:X1"
		}
	},
	"dsl": {
		"atmbridge": {
			"vpi": 1,
			"vci": 32,
			"encaps": "llc",
			"payload": "bridged"
		},
		"modem": {
			"type": "adsl",
			"annex": "a",
			"firmware": "\/lib\/firmware\/adsl.bin"
		}
	}
}

root@LEDE:~# swconfig list
Found: switch0 - eth0

root@LEDE:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.XXXXXXXXXXX0	no		eth0

ifconfig returns

br-lan
eth0
lo
nas0

I think nas0 maps to DSL

I tried to use a LAN port for WAN, but it doesn't seem to support VLAN.

root@LEDE:~# swconfig dev eth0 show
Global attributes:
	enable_vlan: 0
Port 0:
	pvid: 0
Port 1:
	pvid: 0
Port 2:
	pvid: 0
Port 3:
	pvid: 0
Port 4:
	pvid: 0
Port 5:
	pvid: 0
Port 6:
	pvid: 0

Hi.
I think there is no full vlan support yet.

I have found solution using vlan.

what is it ?

It's simple if you have LuCI installed. You should consult OpenWrt documentation for this @ openwrt.org.

If anyone has an actual answer to this, I would be very happy to know it too. Could you please post it here?

You have to fiddle around with VLANs for this to work. I cannot provide you with exact example but you can always provide your network config and then someone can help you or you can read through the documentation.

Hi. This may help you. This is my config for non-DSL.
config interface 'lan'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option _orig_ifname 'eth0 wlan0-1'
option _orig_bridge 'true'
option ifname 'eth0.1'
option ipaddr '192.168.1.1'
option mtu '1500'

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

config switch_vlan
option device 'eth0'
option vlan '1'
option vid '1'
option ports '0 1 2 3 5t'

config switch_vlan
option device 'eth0'
option vlan '2'
option vid '2'
option ports '4 5t'

config interface 'wan_eth'
option ifname 'eth0.2'
option _orig_ifname 'eth0.2'
option _orig_bridge 'false'
option proto 'static'
option ipaddr '99.99.99.99
option netmask '255.255.255.248'
option gateway '99.99.99.0'
option dns '8.8.8.8 8.8.4.4'

config device 'lan_dev'
option name 'eth0'
option macaddr '00:00:00:00:00:00'

HH3a does not seem to support VLANs and does not have Network -> Switch section in Luci.

I tried to add the switch-related sections in /etc/config/network on HH3a, without changing other sections. After I restarted the network script, the connection was lost and I am locked out of the router.

Could you confirm that the config above works for you on HH3a, not on HH5a or other router? It seems that VLANs on HH3a do not work as expected.

I do not own a hh3a so I cannot confirm but in your config, there should be no value for mtu in lan section. If you have LuCI installed then look for switch config menu under network.

There is no mtu value in the lan section of my config. As I mentioned already, there is no Switch menu item in the Network section in Luci on HH3a.

I was hoping that you the solution you suggested was actually tested on HH3a, which is specifically the topic of this question. Thanks.

Yes, the solution was tested and working.

option macaddr '00:00:00:00:00:00' should be your mac address

I tested the proposed configuration on HH3a with OpenWrt 18.06.6 and 19.07.0. The proposed configuration did not work and I had to change the mapping of physical ports to VLANs to reach a workable solution.

My experiments show that the ports of HH3a are indiced as follows:
[WAN] = not used
[LAN1] = port 4
[LAN2] = port 3
[LAN3] = port 2
[Gig LAN4] = port 6
[CPU] = port 5

I was not able to use [WAN] as a wan port, and I decided to use [LAN1] as wan. For some reason I could not make [Gig LAN4] to work as wan in a similar way.

Here's my config:

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'xx:xx:xx:xx:xx:d8'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 5t'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'
        option macaddr 'xx:xx:xx:xx:xx:d9'

Once again, port [LAN1] is used as WAN, and the red [WAN] port is unused. Don't forget to change MAC addresses to your own. Also, stop and disable dsl_status.