Hi, the following '/etc/config/network' is working the way I want my network to be configured.
If I change the VLAN ID to 100 then it's stop working.
What am I missing?
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
config interface 'lan'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '172.19.200.254'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
option blinkrate '2'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '3 5t'
I only change those to options:
option ifname 'eth0.100'
option vlan '100'
The VLAN implementation in OpenWrt can be a little puzzling at times. While the switch hardware can often support 4096 VLANs, the driver may be limited to a smaller number and uses a "lookup table" to get the parameters for a specific VLAN.
option vlan, the way I think of it, is an index for a table lookup, which happens to default the option vid to the same number. I personally make it a habit to specify vlan and vid both, as well as pvid on the ports. pvid, at least for my switch and its driver, corresponds to the vlan index, not the VLAN tag.
Edit: Hmmm, interesting -- While my switch shows a limited number of VLANs from the driver, I don't see a similar limit on yours.
Hence my question for the help output. It does not indicate the existence of a vid option therefor we can assume a 1:1 mapping of VIDs to vlan table indizes.
@jd65534 - you might want to try setting option enable_vlan4k 1 in the global switch section, otherwise IDs are capped to 16 iirc.
I'm wondering, given my hardware, should I stick with 'enable_vlan4k' or
should I specify 'vid/pvid'?
If the latter, I would appriciate a working example.