Quick update here:
1) The stuff posted by ericwong definitely works, I've tested it and it's 100% solid for putting the routers WAN on to VLAN10.
2) Works with DHCP and PPPoE on VLAN10, not a problem

Presuming psycik wants VLAN10 for UFB in New Zealand. It's all good!
Try this:
Code: Select all
root@Gargoyle:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.20.1'
option dns '8.8.8.8 8.8.4.4'
config interface 'wan'
option dns '8.8.8.8 8.8.4.4'
option peerdns '0'
option ifname 'eth0.10'
option proto 'pppoe'
option username 'user@xtrabb.co.nz'
option password 'abc123'
option keepalive '3 5'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4'
config switch_vlan
option device 'switch0'
option vlan '10'
option ports '5t 6t'
3) It doesn't like applying the changes through UCI, complains about the trunk ports, so it looks like the plugin will have to manipulate /etc/config/network directly which is not quite what I wanted to do, but whatever, it's just gonna turn an ugly workaround even uglier
4) Editing /usr/lib/gargoyle/restart_network.sh and putting a script in there seemed to work just fine for forcing certain networking actions, I'll see if I can get the plugin to inject the VLAN stuff in there.
5) (Putting this down for my own notes) I think I'm gonna have to use UCI to pull the LAN IP, write that to a tempfile along with all the other /etc/config/network guff and just have that file copied over /etc/config/network each time the WebUI reloads the networking. It could be worse, but for a basic "Enable VLAN 10 for UFB in NZ", it should work.
Been _super_ busy, with life in general, but hoping to get a bit more time to spend on this over the next week or two (When I'm not playing DotA)
Wish me luck
