No offense but this is just broken... Either you use a VLAN-Subinterface notation; OR you use these "modern" syntax of :t
to tag the VLAN on an interface (which in this case, in openwrt speak is a device... but yeah you know....)
Depends... Do you want just two individual interfaces, your do you want to have it "similar" like with these all-on-one plastic boxes where you need to have one VLAN for LAN and one VLAN for WAN to separate the ports. My impression is that many people got really configured about this whole "LAN is tag 1" and "WAN is tag 2" just because of this switch chic... It was just there to separate the Ports from each other internally. If you have two or more individual NICs, then yes, you would just configure them on their own... Anyway:
You have 2 options (as I see it)
- Mimic the cheap switch devices and use a single bridge which is vlan aware (Not sure how cool this option is because we wanna do routing and no bridging)
- Configure one bridge you use on your LAN site, and configure your WAN facing interface as an independent device/interface
Back to your problem:
No tag? Then no tag! Tag? Then tag!
See:
config bridge-vlan
option device 'br-lan'
option vlan '10'
list ports 'eth0'
list ports 'eth1:t'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'eth1:t'
Try not to not confuse yourself:
- Name your "Bridge" or "Switch" something more sane and non-conflicting. Like "switch0" (as jow prefers) or I use "br-vlan". (Or, maybe I'm the one who gets confused if I see
br-lan
here and lan
over there...)
- (I assume it is safe to) read "
config bridge-vlan
" as: "Configure; with bridge
a vlan, because there is this tool called bridge
which has an option vlan
to configure.... a vlan on a bridge. iproute2
can do so to. I assume this is just a wired config syntax.
Hope this helps you... somehow... Really its not that hard or complicated, and please try to stay away from these Videos. 98% of the time its wasted time! /oldmansrantingwhoisactuallynotthatold
PPS:
Either list only the NIC without this subinterface notation. OR, leave it out, because if you list a port later on your vlan (which you configure with config bridge-vlan
) the port gets attached to the "bridge" anyway; so the following two stanzas would be correct.
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
and
config device
option name 'br-lan'
option type 'bridge'
But this depends on do you want to have a single vlan-aware bridge, or not. Like stated before: In your case, two separated interfaces makes more sense.
PPPPS: I hope I do not sound rude or anything, its just early, having the first coffee, but your config looked so broken I couldn't help my self but to reply...