I read tons of info about VLANs (like here http://wiki.openwrt.org/doc/uci/network/switch) and almost learned how everything works but real time examples contradict my knowledge. Maybe I'm confusing something.
Here is my network config (the router is WDR4300; 0 is CPU, #1 port is for WAN, I connect my PC on #2 port):
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd8b:97be:db92::/48'
config interface 'lan'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.0.1'
option netmask '255.255.255.0'
option ip6assign '60'
option ifname 'eth0.1'
option dns '212.59.1.1 212.59.1.2 208.67.222.222'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
#config interface 'vlan6'
# option ifname 'eth0.6'
# option proto 'none'
# option defaultroute '0'
# option peerdns '0'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 2 3 4'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1'
#config switch_vlan
# option device 'switch0'
# option vlan '6'
# option ports '0t 1t 5'
Can you explain why I can't access internet when I make #1 port tagged on VLAN '2'?
Internet works now:
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1'
Internet doesn't work:
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1t'
Thanks for your feedback