I am running a large (500+) openwrt site. Things work smoothly, but our configuration software was hacked together four years ago and it is showing its age. Basically we edit the /etc/config files, but could not get the vlans we needed, so we do this configuration on the /etc/rc.local.
We would like to have less points to tweak when making changes, so we decided to create an UCI file and put our customization in it. That is working fine. But creating vlans still eludes us, so you may be able to help.
We have 4 vlans on Ethernet (we use the blue wan port which on some of our routers is PoE).
200, untagged
203 tagged
203.5 tagged
205 tagged
we create vlans on rc.local
vconfig add eth0 203
ifconfig vlan203 up
vconfig add vlan203 5
ifconfig vlan5 up
vconfig add eth0 205
ifconfig vlan205 up
The network bridges between the SSIDs and VLANs are defined in /etc/config/network
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'dhcp'
option hostname 'ap0604'
config interface 'cadastro'
option type 'bridge'
option proto 'none'
option ifname 'vlan5'
config interface 'visitante'
option type 'bridge'
option proto 'none'
option ifname 'vlan203'
config interface 'dados'
option type 'bridge'
option proto 'none'
option ifname 'vlan205'
The SSIDs are defined in /etc/config/wireless
config wifi-iface
option device 'radio1'
option network 'dados'
option mode 'ap'
option ssid 'eduroam'
option encryption 'wpa2'
option key 'xxx'
option server 'zzz'
option port '1812'
config wifi-iface
option device 'radio1'
option mode 'ap'
option encryption 'none'
option network 'cadastro'
option ssid 'WifiUFF'
config wifi-iface
option device 'radio1'
option mode 'ap'
option ssid 'VisitantesUFF'
option network 'visitante'
option encryption 'wpa2'
option key 'yyy'
option server 'yyy'
option port '1812'
config wifi-iface
option device 'radio1'
option network 'dados'
option mode 'ap'
option ssid 'ap0604'
option encryption 'wpa2'
option key 'xxx'
option server 'xxx'
option port '1812'
The question is, is there a way to configure the vlans inside the /etc/config/network file, or should I just create a new /etc/config file and new rc.d script to run it?
--luiz
PS
This is other thread, but
On the newer (LEDE - TP Link TP-WR849N) we use ip link to create the VLANS
ip link add link eth0 eth0.203 type vlan id 203
ip link add link eth0.203 eth0.203.5 type vlan id 5
But due to a bug on the switch we had to use veth - the switch would not accept tagged and untagged vlans on the same port (it would tag our single untagged vlan).
It may make using /etc/config/network even harder.