Continuing the discussion from OpenWrt 19.07.1 ath79 tiny LuCI :
I have a second router TP-Link TL-WR740Nv4. It is running a custom 19.07 that Ashus kindly build for me. It is without (luci+opkg) but with wireguard.
I need help regarding vlan involving the WAN port of WR740.
Currently, WAN is on eth1, and LAN is on eth0.1, it seems switch0 do not include eth1 by default.
I want to change eth1 from untagged to a trunk port. I want to create VLAN interface to run AP and add some eth0 ports as member.
How can I do that by using uci or by editing config files?
Thanks in advance!
Ashus
March 8, 2021, 8:14am
#2
I can give you my VLAN configuration from /etc/config/network
from my Archer C7 with a screenshot.
config switch
option reset '1'
option name 'switch0'
option enable_vlan '1'
config switch_vlan
option vlan '1'
option device 'switch0'
option vid '10'
option ports '0t 2 1t'
config switch_vlan
option device 'switch0'
option vlan '2'
option vid '62'
option ports '0t 3 4 5 1t'
config switch_vlan
option device 'switch0'
option vlan '3'
option ports '0t 1t'
option vid '130'
is equivalent to this:
1 Like
Thank you very much!
My main router is TP-Link TL-WDR3600, which all the physicall ports are under eth0, so I can copy configrations from it for VLANs not involving eth1 - which is the WAN port of the WR740N.
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 2 3 4 0t'
network.wan=interface
network.wan.ifname='eth1'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.ifname='eth1'
network.wan6.proto='dhcpv6'
network.@switch_vlan [0].ports='1 2 3 4 0t'
I understand that 0 is CPU, and 1-4 and LAN ports 1-4 physically. But what is the number for eth1 (wan port)?
How can I add "eth1" to a vlan using a line similar to above?
Ashus
March 8, 2021, 9:12am
#4
Most likely you can't. VLAN configuration is valid for switch part of the device, what you see as eth0. My device has switch over all ports, so I can assign them all. Use only those four ports you see and a switch if you need to connect more devices.
1 Like
OK. I will only use the yellow ports while leaving the blue colored wan port empty.
It turns out the physical to logical port number mapping is funny:
Physical 1 <> Logical 2 (as used in vlan membership assignment)
Physical 2 <> Logical 3
Physical 3 <> Logical 4
Physical 4 <> Logical 1
system
closed
March 18, 2021, 10:59am
#6
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.