[Solved] Tp-link c59v2 powered by OpenWrt snapshot missing vlan

Hi guys.

I have tp-link c59 ver2 powered by "OpenWrt SNAPSHOT r11508-000b7687bc" latest avaliable for v2 models fat openwrt site.
I need to create three vlans 1,10,60 all untagged. My config as bellow:
+++++++++++
/etc/config/network
+++++++++++

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

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'
        option ipv6 '0'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.10'
        option proto 'static'
        option ipaddr '192.168.174.1'
        option netmask '255.255.255.240'
        option broadcast '192.168.174.15'
        option ipv6 '0'

config interface 'vlan60'
        option type 'bridge'
        option ifname 'eth0.60'
        option proto 'static'
        option ipaddr '192.168.174.33'
        option netmask '255.255.255.248'
        option broadcast '192.168.174.37'
        option ipv6 '0'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t'

config switch_vlan
        option device 'switch0'
        option vlan '10'
        option ports '0t 2 3'

config switch_vlan
        option device 'switch0'
        option vlan '60'
        option ports '0t 1 4'
root@a81m3:/home/sam#

so vlans enabled 1,10,60 and ports 1,4 are members of vlan 60 and 2,3 members of vlan 10 but after applying config I see subinterfaces eth0.10 & eth0.60 created (good) but vlan 60 missing... bellow "swconfig dev switch0 show" output

root@a81m3:/home/sam# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        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:
        mib: MIB counters
RxGoodByte  : 2402 (2.3 KiB)
TxByte      : 0

        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: No MIB data
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: No MIB data
        pvid: 10
        link: port:2 link:down
Port 3:
        mib: No MIB data
        pvid: 10
        link: port:3 link:down
Port 4:
        mib: No MIB data
        pvid: 0
        link: port:4 link:down
VLAN 1:
        vid: 1
        ports: 0t
VLAN 10:
        vid: 10
        ports: 0t 2 3

root@a81m3:/home/sam#

Could you guys suggest why?

Thank you in advance.

VLAN tags over the size of the VLAN table (often 16 or 128) require the vid to be explicitly specified.

https://openwrt.org/docs/guide-user/base-system/basic-networking#config_switch_vlan

1 Like

Plus to @jeff's comments:

Wrong, bcast is .39
Better not use broadcast at all, it is automatically calculated.

Wrong, it must be just 1

1 Like

ok. I fixed my issue.
Thank you.

1 Like

ups. broadcast corrercted. Thank you. :slight_smile:
second question.
Why "option enable_vlan '1 10 60'" is wrong?
I thought openwrt "enable_vlan" is analog cisco's "vlan database followed by vlan60" or "set vlan create 60" or similar...
in case "enable_vlan" not for create L2 vlan (I don't mean L3 SVI) what this?
my geassing this option to specify native (untagged) vlan?

enable_vlan turns on the overall VLAN functions of the switch. It is either 1 or 0. If it is zero the switch chip operates like an unmanaged switch and switched all ports untagged to all the other ports. This is generally not very useful.

The switch_vlan stanza sets up a VLAN in the switch and defines the ports it is attached to. No other reference to it is needed.

1 Like

ok got it. Thank you for explanations.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like