config switch_vlan
option device 'switch0'
option vlan '10'
option ports '1 2 3 4 0t 5' <--- t or w/o t
followed by restarting network all LAN and WAN interfaces (eth0 and eth1) switch is not reachable at all.
interface eth1 is routed one, but not switchport interface. Looks like need to change mode from routed to switchport mode and than setup trunk.
Based on the device info page, you have eth0 for the WAN port and eth1 for LAN. This means that you need to remove eth0 from the wan network interface, and put eth0 into br-lan.
The default configuration for your device probably looks something like this:
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0'
option proto 'dhcpv6'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1.1'
You need to remove eth0 from both wan and wan6 (or delete those interfaces entirely) and then make the br-lan definition look like this:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1.1'
list ports 'eth0'
NOTE: it is possible that this could result in lower than expected throughput between eth0 (WAN port) and any of the ports on the switch (LAN 1 - 4). This is because the bridge is effectively a software based switch, meaning that the CPU is typically required to actually move data between those physical interfaces. The CPU itself my have limited bandwidth for this type of task (unlike the purpose built switch chips), thereby causing a bottleneck. As an example, the Ubiquiti ER-X has a 5-port switch which has a cool feature that the ports can included on the switch or removed from the switch and used as individually routed ports. When switching data between any of the ports on the switch, data can move at full gigabit speeds in each direction. However, when a routed port is bridged to the switch, the bandwidth is limited to approximately 250Mbps.
This tplink c59v2 ao has 1gb WAN and 4x 100/10 mbps LAN ports.
this is dump L2 access point L3 router in fron of it holds SVIs for VLAN 10-14. Connection between AP and router is .1q trunk (port 2 from access point side)
router in front of AP has all interfaces in 1gb speed.
idea is: Move trunk currently connected to 100/10 mbps LAN switch port #2 (AP side) to 1GB WAN port, but WAN port is routed port not switchport . Idea to just create 10-14 not holding IPs eth1 (WAN) subinterfaces from AP side doesn't work as per eth1 atill in access mode even it has 5 subinterfaces for vlans, but router interface reconnected to AP's WAN port in dot1q ytunk mode. so mismatch here...
Any idea how to force/configure 802.1q encapsulation for WAN eth1 interface?
IMO, there is little or no value in moving the trunk to the physical 1GBps WAN port unless you absolutely need the extra physical port. Because of the bridging, you might end up with slower throughput than simply putting everything on the switch and ignoring the WAN port entirely.
However, if you want to create additional VLANs on the WAN port, you would do it with dot notation (eth0.x where x is the VLAN ID).
So if you want to create a bridge for VLAN 11, as an example, it would look like this:
config device
option name 'br-vlan11'
option type 'bridge'
list device 'eth1.11'
list device 'eth0.11'
config switch_vlan
option device 'switch0'
option vlan '11'
option ports '0t 2t'
config interface 'vlan11'
option proto 'none'
option device 'br-vlan11'