Page 1 of 4

Add GUI for VLAN configurations

Posted: Wed Oct 01, 2014 7:35 pm
by ericwong
Recently, I was trying to setup Gargoyle for a fibre internet connection and the ISP requires a specific VLAN tagging in order for the connection to work.

The VLAN configuration I needed for the fibre connection uses the same setting as this guide shows.
http://www.klseet.com/index.php/singtel ... 18-openwrt

Openwrt's LUCI web interface allows one to configure the VLAN but Gargoyle does not.

In the end, I was able to configure VLAN on Gargoyle by modifying /etc/network

However, the problem is if I attempt to change any settings related to network, e.g. change WIFI access point name or password, Gargoyle will reset my VLAN settings back to default, effectively breaking my internet connection.

Ideally, I would like to see Gargoyle have VLAN configuration UI or at least stop Gargoyle from modifying my custom VLAN settings when one make changes on the web interface. Without such web UI, average users who want to use Gargoyle on internet connections that requires tagging probably will never figure out how to make it work...

My /etc/config/network for TP-1043nd v1 on Gargoyle v1.6.2

Code: Select all

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 'eth0.1'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.1.1'
	option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
	option proto 'dhcp'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option ifname 'eth0.10'

config switch
	option name 'rtl8366rb'
	option reset '1'
	option enable_vlan '1'
	option enable_vlan4k '1'

config switch_vlan
	option device 'rtl8366rb'
	option vlan '1'
	option ports '1 2 3 4 5t'

config switch_vlan
	option device 'rtl8366rb'
	option vlan '10'
	option ports '0t 5t'

My /etc/config/network for TP-1043nd v2 on Gargoyle v1.6.2

Code: Select all

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.1.1'
	option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
	option ifname 'eth0.10'
	option proto 'dhcp'
	option dns '8.8.8.8 8.8.4.4'
	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 '0 1 2 3 4'

config switch_vlan
	option device 'switch0'
	option vlan '10'
	option ports '5t 6t'


Re: Add GUI for VLAN configurations

Posted: Wed Nov 12, 2014 4:37 am
by psycik
Not that I can get UFB anytime soon...but could this be fine under the new plugin Architecture?

Id rather get back into double natting

Re: Add GUI for VLAN configurations

Posted: Thu Nov 13, 2014 10:17 pm
by ericwong
psycik wrote: Id rather get back into double natting
Double NAT will likely cause performance issues and more importantly cause complications if you are trying to setup port forwarding or home remote servers, such as IP web cam or ftp server.

Why use two routers when you can use one?

It is not difficult to configure it manually if you know how.. but it is annoying that the manual network configuration is wiped EVERY time I make unrelated changes such as WIFI AP/Name password.

Re: Add GUI for VLAN configurations

Posted: Wed Nov 26, 2014 6:30 pm
by psycik
Sorry, my statement was supposed to be "I'd rather NOT get back into double natting".

When my time finally comes for UFB, I'll look at the manual instructions.

What else will cause the settings to be lost? Quota changes? Firewall port changes (probably the two most common things for changing).

Re: Add GUI for VLAN configurations

Posted: Wed Nov 26, 2014 10:40 pm
by ericwong
psycik wrote: What else will cause the settings to be lost? Quota changes? Firewall port changes (probably the two most common things for changing).
My experience is anything on the Connection -> Basics page will reset my manual VLAN setting to default.

Re: Add GUI for VLAN configurations

Posted: Tue Jun 02, 2015 7:18 am
by kiwifruta
UFB is being installed at my home soon and I plan on using Gargoyle 1.62 on a WR1043ND v1.8.

Did you sort the issues about the VLAN settings dropping off?

Re: Add GUI for VLAN configurations

Posted: Tue Jun 02, 2015 10:41 am
by ericwong
kiwifruta wrote:UFB is being installed at my home soon and I plan on using Gargoyle 1.62 on a WR1043ND v1.8.

Did you sort the issues about the VLAN settings dropping off?
Nope, no solution other than manually changing it every time as described above.

Re: Add GUI for VLAN configurations

Posted: Tue Jun 02, 2015 3:51 pm
by kiwifruta
Thanks Eric.

Re: Add GUI for VLAN configurations

Posted: Mon Sep 21, 2015 4:13 am
by psycik
Just looking at this again which will hopefully be requied by me on Thursday.

I've looking through the configs and just see this section of yours:

Code: Select all

config switch_vlan
   option device 'switch0'
   option vlan '10'
   option ports '5t 6t'
I see I have an existing one that is

Code: Select all

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 6'
I assume I can just create the vlan 10 one. But I note that mine says ports 5 6 where your example has 5t 6t.

Should my new one be 5t 6t as you state?

Thanks

Re: Add GUI for VLAN configurations

Posted: Mon Sep 21, 2015 5:24 am
by ericwong
psycik wrote:Just looking at this again which will hopefully be requied by me on Thursday.

I've looking through the configs and just see this section of yours:

Code: Select all

config switch_vlan
   option device 'switch0'
   option vlan '10'
   option ports '5t 6t'
I see I have an existing one that is

Code: Select all

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 6'
I assume I can just create the vlan 10 one. But I note that mine says ports 5 6 where your example has 5t 6t.

Should my new one be 5t 6t as you state?

Thanks
Yes, all my configurations are necessary for my setup.
I can't tell about yours. The t setting is needed to mark those packet for VLAN 10. Otherwise, it may not work.

Code: Select all

config interface 'wan'
   option ifname 'eth0.10'
This change at this part is essential too.
Otherwise, the rest of the changes are in vain.
You can find additional information about VLAN settings on Openwrt.